fixed failing JSON decoding in rails 3-0-stable #9126

merged 1 commit into from Feb 11, 2013


None yet
7 participants

This change fixes a JSON decoding problem for strings, fixnums and nil objects introduced by 3.0.20.


All 3 cases resulted in an ActiveSupport::OkJson::Error being raised.

I've submitted a pull request for Rails 2.3.16 as well. See #9107

tenderlove added a commit that referenced this pull request Feb 11, 2013

Merge pull request #9126 from mbarb0sa/bugfix/json-decoding-in-rails-…

fixed failing JSON decoding in rails 3-0-stable

@tenderlove tenderlove merged commit 360af4e into rails:3-0-stable Feb 11, 2013

would be good to get a 3.0.21 release out, since this fix is for a .20 introduced degradation + include the latest sec fixes


al2o3cr commented Feb 11, 2013

@steveklabnik - weren't you just pointing out how people shouldn't be calling JSON.load? This patch explicitly swaps out parse for load...


tenderlove commented Feb 11, 2013

Yes, confirm. I should not have merged this (though it hasn't been released)


tenderlove commented Feb 11, 2013

I guess it never will be released, so I'll go ahead and revert this for now. Sorry. :'(

tenderlove added a commit that referenced this pull request Feb 11, 2013

Revert "Merge pull request #9126 from mbarb0sa/bugfix/json-decoding-i…

This reverts commit 360af4e, reversing
changes made to f93d046.

I fully acknowledge and understand the "no more 3.0.x" releases policy, but would it not be reasonable to predominantly get the word out that 3.0.20 is known to be broken in fairly critical ways, that developers responsible for applications running on 3.0.20 should look to switch from okjson to JSONGem to avoid this breakage, and that they should then strongly consider upgrading to a supported version of Rails?

From my perspective, maintaining a production app currently running 3.0.20 (and looking to upgrade asap!) and discovering breakage around accented characters and other oddities several days after the fact, it would have been very useful to have some kind of authoritative easy-to-find statement of the situation instead of trawling through pull requests.


bf4 commented Feb 13, 2013

or since it was reverted

gem 'rails', :git => 'git://', :ref => '182d4e3719' # 3.0.21, see

could there be a community-maintained branch / fork? (would also likely be useful for the 2.x folks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment