Rails 5.0.1 has been released
weblog.rubyonrails.org
weblog.rubyonrails.org
We contacted the Rails team early on about this issue and worked closely with them to have this issue solved. Now that 5.0.1 is released we are at liberty to disclose details about this security issue.
I've written a blog post[2] on the problem, using OS X network shaping tools and a simple app to demonstrate it. Rails apps running on Passenger were never affected as Passenger implements response buffering for regular requests as well as websockets connections. Note that even popular reverse proxies like Nginx don't perform response buffering for websockets as far as I know, so this is something to be aware of if you're running on other frameworks than Rails as well.
[0] GH merge of patch: https://github.com/rails/rails/pull/26646
[1] GH related issue: https://github.com/rails/rails/issues/26409
[2] Blog post: https://blog.phusion.nl/2016/12/21/actioncable-under-stress-...
Approximately hundreds of small bug fixes, across much of Rails. The fixes include some important ones for database types, time comparisons, thread issues, record reloading, etc.
IMHO these fixes address dozens of bugs that could cause major puzzlement for a typical Rails developer.
Thanks to all the contributors for excellent work on this release.
Even if you don't upgrade, this is something you should backport using a monkeypatch.
> Restore aborted transaction state when disable_referential_integrity fails due to missing permissions.
That has been the reason I always avoid huge frameworks like RoR.
If I was to hit a bug like this, I wouldn't know where to start debugging. How do people deal with obscure bugs in the framework with something like RoR?
If you hit however in production and only under load or some corner cases, it must be a real bitch to try to debug code that you haven't wrote yourself.
But since my original post is being seen as a troll, I think I will just shut-up and go hide under a rock or something. :D
I'll also try to explain why:
A few weeks later I have forgotten the specifics about my own code as well.
Also: often there are fewer bugs in library code.
And: getting help (paid or through stackoverflow) is probably easier.
Fair enough :D
> A few weeks later I have forgotten the specifics about my own code as well.
> Also: often there are fewer bugs in library code.
> And: getting help (paid or through stackoverflow) is probably easier.
I can definitely see your point, especially about being easier to get help. I imagine if you are anything other than a one man shop, you will be in much better position debugging Rails or Django, rather than trying to figure out the mess you ex-employee left.
Then you share the test case in a bug report, and collaborate to fix it. Fixing it usually involves a source code dive.
With Rails's reasonably well documented and reasonably well written codebase it's usually possible to grok the source and dependencies even coming to it cold. With the possible exception of arel.
Ruby's dirty tricks department (monkey-patching third-party objects) and duck typing together are a real boon to debugging.
Seeing the praise it gets here, I will definitely give RoR a chance for my next side-project. Thanks again.
Github, Shopify, AirBnB, Indiegogo, Kickstarter, Twitch, Zendesk and many others run on Ruby on Rails. You'll be in good company!
Using Ruby's dirty tricks on shipped code -> hard for debugging/understanding. Using Ruby's dirty tricks while debugging -> boon.
The grandparent didn't claim the former to be false, only the later to be true.
Still I plead guilty to having occasionally monkey-patched prod code out of urgent necessity. My recommendation is to view it like an advanced and undesirable form of configuration; for my rails apps, each such hack always goes in an initializer file named for the library it is patching. If you are replacing third-party methods (or undermining the behaviour of a third-party method) and those methods are not called very frequently then judicious use of log noise e.g. through the deprecation mechanism will help at debug time.
It got too late so I couldn't finish the job, but once I do, I'll get it working for my project, then package it up and make a pull request so I don't have to support it myself.
Ruby is definitely wizardry but it's accessible wizardry.
> That has been the reason I always avoid
> huge frameworks like RoR.
For others it is the reason to use huge frameworks like RoR. Because alternative is to hunt obscure bugs in the framework you built yourself.That's a false dichotomy, there are also smaller frameworks available.
Anyways, I unfortunately work with Rails and I hate it. To me Rails stresses and encourages bad practices, everything has an implicit environment inherited from a massive hierarchy of classes with their own implicit environment that will only work if the current state of the app matches what each classes assumes it will be.
Data changes and morphs during the initialization and creation of class instances causing shitty bugs. EVERYTHING needs careful consideration of all of these relations and class hierarchies before writing simple things.
Everything is highly coupled and interwoven making a change one place break something somewhere else. Rails should be taught in Universities as a case study in the pitfalls of Object Oriented Design
Also essentially all of the major players have left and moved on to new things. Most Ruby Gems haven't been updated in years!
Bugs from 5.0.0 or from 4.whatever? If it's the latter then bug fixes should be going there, not in a new major release.
(there is a separate branch for 4.x.y releases, but that's only security patches nowadays)
Are there other gems and resources available for accelerating the migration from 4 to 5? Been thinking about doing it for a project for a little while.
There are plenty of stable companies out there running Rails apps and I'd venture a guess that a lot of start-ups probably still use it as it's great for small teams and rapid-prototyping.
On a side note, we also have hired devs who don't have Ruby experience but who are generally smart, experienced people, who know more than one programming language and are willing to learn whatever stack they need to for getting the job done.
There's also a weird amount of self promotion going on with that repo. Not sure what it is about that but it's kind of been a turn off to me.
Thanks!
Thanks!