Live data from Hacker News

How Homakov hacked GitHub & the line of code that could have prevented it

gist.github.com

1–10 of 91 posts

Re: How Homakov hacked GitHub & the line of code that could have prevented it

#2
I must say that this episode is the best example of how to handle such cases. Homakov found the issue and made his point without any sign of maliciousness. Github, also handled is extremely professionally by accepting it and fixing the problem and then publishing a full report on it, rather than get into a pissing match with Homakov and getting law enforcement and lawyers involved.

BigCo's should take a note.

Re: How Homakov hacked GitHub & the line of code that could have prevented it

#4
Just a heads up for those who only read the TL;DR: Please be aware that if you just put that single line of code in your initializers for your existing app, your app will break anywhere you are using update_attributes(). They do call it out later in the article, but you have to set attr_accessible on all your models.

Re: How Homakov hacked GitHub & the line of code that could have prevented it

#5
I wonder how many Rails apps there are out there that is still vulnerable to this sort of flaw. Both GitHub and Posterous has fixed it, but there's probably thousands of smaller less known Rails sites/apps that still haven't been patched.

Re: How Homakov hacked GitHub & the line of code that could have prevented it

#8
I posted a link to the relevant part of it (http://news.ycombinator.com/item?id=3665429) on another thread regarding this exploit already, but the official Rails Security Guide covers this and other common security pitfalls really well. It is worth reading over thoughtfully if you are building a Rails app:

http://guides.rubyonrails.org/security.html

Post reply on HN