4 ms·
I've always found Rails to be easy to secure compared to most other frameworks. I think the defaults are all pretty secure. I'd prefer having constant securit
by dmix 14y ago
I've always found Rails to be easy to secure compared to most other frameworks.
I think the defaults are all pretty secure.
I'd prefer having constant security patches. It shows people are still constantly testing it for vulnerabilities.
- biot 14y agoThat's a false dichotomy. I'd prefer to have people constantly test something for security vulnerabilities and find nothing because the code was thoroughly audited and shown to be secure before it was released.
- VMG 14y agoby that logic php is rock solid
- revelation 14y agoSQL injection is the web-equivalent of having a stack allocated buffer overflow. We have built and use (expensive) abstractions that supposedly eliminate these whole class of issues. With Rails, you get the expensive abstraction and apparently none of the security.
- phillmv 14y agoYes, clearly, because Rails has introduced absolutely no other kind of default protection. Is this an argument for hand rolling your own code, or for using some other framework that is apparently immune (or, to be charitable, has a stronger security track record)?
- srdev 14y agoLikely its an argument to use parameterized queries which fix the SQL injection problem altogether. I'm not familiar with Ruby, but surely they support it in 2013?
- qxcv 14y agoThey do, but what we're talking about here is an ORM, so there will always be machine generated SQL somewhere. Or do you believe that GP is suggesting that developers use parameterised SQL queries instead of an ORM?
- untog 14y agoEr, why can't the ORM use paramaterised queries?
- jeltz 14y agoThe problem is that ORMs like ActiveRecord really are just domain specific languages for building queries. If these DSLs use inband are carelessly constructed (e.g. they use some form of inband signaling) you can do the injection attack against the actual ORM code and make it build queries the author of the code did not intend.
- sontek 14y agohttp://sqlalchemy.org/ http://sqlalchemy.org/ is an ORM and does not have these security issues. So it can be done.
- ssmoot 14y agoThat's a leap. Yehuda and I knew about the mass-assignment vulnerability during DataMapper v0.3, way back in the Merb days, before Rails3. Yet it didn't get addressed until a few months ago. PS: It's still broken IMO. It needed a rethinking of strategy and purpose. Instead it got a quick hack. If you want to see mass-assignment done right, look to Play Framework's First Class Forms support.
- steveklabnik 14y agoMass assignment as a feature is completely removed from Rails 4, and a gem with the replacement (strong_parameters) is available _today_ for you to use with any 3.x application.
- deleted 14y ago[deleted]