Попадает девелопер на небеса... Показывают ему ад - народ бегает, светится, овертаймит, курит - пробует успеть к дедлайну...
Нет, говорит, надоело - показывайте рай!
Ведут в рай - там тоже самое...
А в чем разница, спрашивает?
- А одни успевают, а другие нет...
Those who don't know methods attr_accesible / protected - check that article out http://enlightsolutions.com/articles/whats-new-in-edge-scoped-mass-assignment-in-rails-3-1
Let's view at typical situation - middle level rails developer builds website for customer, w/o any special protections in model(Yeah! they don't write it! I have asked few my friends - they dont!)
Next, people use this website but if any of them has an idea that developer didnt specify "attr_accesible" - hacker can just add an http field in params, e.g. we have pursue's name edition. POST request at pursues#updateid = 333 (target's pursues id)
pursue['name'] = 'my purses name'
pursue['user_id'] = 412(hacker id)if code is scaffolded than likely we got Pursue.find(params[:id]).update_attributes(params[:pursue]) in the controller. And that is what I worry about.
After execution that POST we got hacker owning target's pursue!
I don't mean that it is Rails problem, of course not. But let's get it real(Getting Real ok) - most of developers are middle/junior level and most of them don't write important but not very neccessary things: tests, role checks etc including topic - attr_accesible
how to avoid injections ? What should Rails framework do to force people to keep their rails websites safe? Making attr_accesible necessary field in model? What do you think guys.
This is not only bug report, because this problem is so wide spreaded. postereous, speakerdeck, scribd, github - and I only have started testing.
We need to introduce blacklist attributes. MOst of rails apps(from small to github) likely got mass-assignment bugs if they don't user attr_accessible.
I just want to attract more attention to reviewing this problem from scratch and calmly decide - what should we do with M As-ment problem.
On Sunday morning, 4 March, Egor Homakov exploited a flaw in how theRuby on Rails web framework handles mass assignments that allowed him to write a posting, delete a posting or push changes into source code on anyGitHub project. Homakov had previously created an issue regarding mass assignment security on the rails issue tracker on GitHub; this was closed by the developers saying that it was the application developers' responsibility to secure their applications. Homakov then decided to demonstrate the issue using the nearest Ruby on Rails application, GitHub.
Because of the United States' current immigration and regulatory regime, bold and creative entrepreneurs from around the world aren’t given the chance to come to Silicon Valley and develop the technologies that could be creating jobs and propelling the economy forward. Blueseed aims to solve this problem so that Silicon Valley remains the world’s center for innovation. Our team, backed by PayPal founder Peter Thiel, is creating a high-tech visa-free entrepreneurship and technology incubator on an ocean vessel in international waters. Our facilities will be a short ferry ride away from Silicon Valley so that great ideas and talent from around the world can live, work, and play while having convenient access to the San Francisco Bay Area. We will provide a customized environment centered around smart, proven, cost-effective legal best practices, and modern living and work accommodations. When launched, Blueseed will enable countless great ideas and talented individuals to test themselves in the hotbed of Silicon Valley. With our incubator, startups and individuals will also get a chance to establish the connections and capital necessary to move their operations onto land if they so choose. Silicon Valley needs to bring in great talent, and all of us benefit when great people and ideas come together to drive innovation. We hope you will join us when we set sail.
Про затвердження
Правил паркування транспортних засобів
14. Відведені майданчики для платного паркування обов'язково
повинні бути обладнані паркувальними автоматами з розрахунку не
менш як один автомат на 10 місць для паркування з обох боків
уздовж проїзної частини вулиці, дороги або тротуару. 16. На спеціально обладнаних майданчиках для платного
паркування обов'язково повинні бути встановлені автоматичні в'їзні та виїзні термінали.20. Не обладнуються паркувальними автоматами та автоматичними
в'їзними та виїзними терміналами спеціально обладнані майданчики
для платного паркування у разі їх призначення виключно для
користувачів, які сплачують вартість послуг з утримання
майданчиків для платного паркування у безготівковій формі за
договором про паркування протягом визначеного строку, але не менш
як один місяць.
21. На майданчиках для платного паркування у доступному для
ознайомлення користувачів місці розміщується інформація про: оператора (найменування, адреса, контактні телефони); вартість послуг з утримання майданчиків для платного
паркування, спосіб оплати (готівковий або безготівковий). { Абзац
третій пункту 21 із змінами, внесеними згідно з Постановою КМ N 27
( 27-2011-п ) від 19.01.2011 }