Rails 1.2.5: Security and maintenance release
Posted by michael October 12, 2007 @ 04:44 PM
This release closes a JSON XSS vulnerability, fixes a couple of minor regressions introduced in 1.2.4, and backports a handful of features and fixes from the 2.0 preview release.
All users of Rails 1.2.4 or earlier are advised to upgrade to 1.2.5, though it isn’t strictly necessary if you aren’t working with JSON. For more information the JSON vulnerability, see CVE-2007-3227.
Summary of changes:- acts_as_list: fixed an edge case where removing an item from the list then destroying the item leads to incorrect item positioning
- deprecated calling .create on has_many associations with an unsaved owner (like post = Post.new; post.comments.create)
- backport array and hash query parameters
- fix in place editor’s setter action with non-string fields
- updated config/boot.rb to correctly recognize RAILS_GEM_VERSION
To upgrade, `gem install rails`, set RAILS_GEM_VERSION to ‘1.2.5’ in config/environment.rb, and `rake rails:update:configs`.

Has anyone yet successfully updated their gem? I keep getting:
ERROR: While executing gem ... (OpenURI::HTTPError) 404 Not FoundDoesn’t appear to have propagated to all the rubyforge mirrors as of yet… anyone have any idea how long that normally takes?
I tried this:
$ sudo gem install rails—source http://gems.rubyonrails.org Install required dependency activesupport? [Yn] ERROR: While executing gem … (Gem::GemNotFoundException) Could not find activesupport (= 1.4.3.7843) in any repository
So far I’ve found that 1.2.4 isn’t actually a “drop-in replacement” and now this gem doesn’t work.
Whats wrong guys… has it been so long that you forgot how to do a release?
I’m getting the GemNotFound version error as well .. I saw some very recent commits by david with regards to versioning .. maybe they missed to update the version numbers and we’ll be able to install soon when the next build is done.
Got it! thanks Jeremy (guess its been so long I did forget how to use gem).
Dave, ha ha. Please wait for the RubyGems repository to propagate the updated gems out to the mirrors.
In the meantime, `gem install rails—version ’= 1.2.5’—source http://gems.rubyonrails.org/`
And you can `gem help` if it’s been so long you forgot how to use gems ;)
A thought… How about the rails team waits for the propagation to the mirrors to complete before posting a release announcement to the blog?
Think of all the wasted effort and annoyance this would save. No?
Too true. We’ll release at night instead of at the beginning of the day, too ;)
Thanks for getting the JSON fix out there so quickly and backporting some neat new features as well. Keep up the great work :) I really look forward to the 2.0 release.
Hi
Except for an error message on clicking the About Your App’s Environment, it looks OK
“Routing Error, no route found to match /rails/info/properties with (:method :Get)
Details at http://cch4rails.blogspot.com
Aha. I was wondering what 1.2.5 was when it installed yesterday morning instead of the 2.0PR. I must have gotten it not long after the gem went live.
Thanks for the info.
Does the “backport array and hash query parameters” provide any new features? Could someone elaborate on this? Thanks.
James, it means you can, for example, do search_url(:terms => %w(apple orange pear)) to get /search?terms[]=apple&terms[]=orange&terms[]=pear
Thanks!
Succesfully upgraded without any problems.
Ain’t working. Installed over 50 times and all was well, after 1.2.5, base install is getting the properties issue and 404 errors when I create new projects. Other suggested workarounds aren’t working. Suggestions?
Any reason the homepage still says 1.2.4. is the current release and the linked 1.2.4 announcement hasn’t beeen updated to inform everyone to go to 1.2.5?
Steve, good point! Fixed.
After upgrading to 1.2.5 and the 1.25.7919 2.0pr, non-generated public methods on my AR objects are getting NoMethodError, yet o.public_methods includes them. The means all business logic implemented as methods on AR objects is broken. Anybody else seeing this issue? Ruby 1.8.6, rubygems 0.9.4, mongrel 1.01 all on FreeBSD 6.1.
Um, nevermind sort of. There is a bug if a model method starts with ‘active’ where the method is not accessible. I just happened to to have methods named active_from and active_until. Think the problem has been around longer than this release.
Sorry.
Issue with relative path in Windows. Note to self… “When on Windows…always launch server as ruby script\server”. So it was a brain, not a patch issue.
As of today, upgrading from 1.2.3 works fine (restarted web- and db- servers just in case).
I think some comments here could have been less harsh, I guess problems don’t get fixed any faster if you’re being rude.
Keep up the good work.
The following installation procedure works for me on my OS X Tiger (10.4.10) on MacBook Pro: Password: Bulk updating Gem source index for: http://gems.rubyonrails.org/ Install required dependency activesupport? [Yn] Y Install required dependency activerecord? [Yn] Y Install required dependency actionpack? [Yn] Y Install required dependency actionmailer? [Yn] Y Install required dependency actionwebservice? [Yn] Y Successfully installed rails-1.2.5 Successfully installed activesupport-1.4.4 Successfully installed activerecord-1.15.5 Successfully installed actionpack-1.13.5 Successfully installed actionmailer-1.3.5 Successfully installed actionwebservice-1.2.5 Installing ri documentation for activesupport-1.4.4… Installing ri documentation for activerecord-1.15.5… Installing ri documentation for actionpack-1.13.5… Installing ri documentation for actionmailer-1.3.5… Installing ri documentation for actionwebservice-1.2.5… Installing RDoc documentation for activesupport-1.4.4… Installing RDoc documentation for activerecord-1.15.5… Installing RDoc documentation for actionpack-1.13.5… Installing RDoc documentation for actionmailer-1.3.5… Installing RDoc documentation for actionwebservice-1.2.5…
[/Users/Ric]
Successfully installed on Ubuntu Linux and Mac OS X. No problems. Keep up the good work!
On a completely unrelated note: Why does *.rubyonrails.org => the blog? There has to be a story behind that!
fyi, this page does not display correctly under IE7 (upper left is all jumbled)
I can confirm the IE7 disply problem – posted from IE7!
What does api.rubyonrails.org represent with regard to version? If it is 1.2.5, shouldn’t ActionController::HttpAuthentication be up there?