News for hackers. Stuff that matters.
Re:The Trello Tech Stack by trotsky on Thursday January 19, 2012 @01:50PM (#3485974)
How vulnerable are all javascript approaches in terms of injection type attacks? Do apps like node and mongo effectively prevent them, or is it still possible to shoot yourself in the foot? I've read some off hand comments along the lines of "as long as you're not a total moron you have nothing to worry about", but that sounds a lot like what was said about sql injections and xss before exploiting them went mainstream and it turned out everyones apps were filled with them. Has anyone audited a real world app built with a stack like this and come away with any experience to share?
Re:The Trello Tech Stack by radagaisus on Thursday January 19, 2012 @03:21PM (#3486475)
You CAN do injections to MongoDB code. An injection is basically 'allow user input to interfere with code' so for mongoDB assuming the query is a string you can do '{name: ' + user_input + '}'. and user_input, without sanitizing it (which is simpler, just converting it to a string) could be: {'$where': ...}

http://www.mongodb.org/display/DOCS/Do+I+Have+to+Worry+About...

Re:The Trello Tech Stack by rjrodger on Thursday January 19, 2012 @05:59PM (#3487309)
Unlike SQL, which you have to build as a string, the natural approach in JavaScript (even for junior devs) is to use an object literal to build the query. And then you get escaping for free.
Re:The Trello Tech Stack by JoachimSchipper on Thursday January 19, 2012 @03:31PM (#3486529)
See http://news.ycombinator.com/item?id=3369876. Summary: people seem to be ignoring security.

Also note stuff like https://news.ycombinator.com/item?id=3419693: node.js is not free of issues itself. (To be fair, lots of people got that wrong and it was patched quickly.)

Re:The Trello Tech Stack by trotsky on Thursday January 19, 2012 @07:49PM (#3487734)
Thanks very much!
Re:The Trello Tech Stack by brown9-2 on Thursday January 19, 2012 @01:55PM (#3486014)
What would be the difference in how you would handle this in a single-page JS app like Trello versus a traditional Java/Python/Ruby-based multi-page backend that mostly serves HTML pages?

It seems like at the end of the day you still need to validate and sanitize user input before doing anything with it.

Re:The Trello Tech Stack by trotsky on Thursday January 19, 2012 @02:11PM (#3486074)
I was inquiring more about the backend js use in node and mongo.

You might, for instance, find that simply sanitizing user input isn't enough when you're using the same interpreted language at multiple stages. If an attacker could cause the right front end code to be executed on the app server, or backend code to be executed in the database you could potentially compromise a lot.