Brightbox
  • Home
  • Pricing & Sign up
  • Why Brightbox?
  • Products & Services
  • FAQs
  • About
  • Blog
  • Wiki
  • Forums
  • Contact
Blog RSS feed
twitter_banner

Flickr


more images...

Recent Posts

  • Passenger 2.2.11 packages for Ubuntu 8.04 Hardy
  • Passenger 2.2.10 packages for Ubuntu 8.04 Hardy
  • Important announcement: Multiple users and accounts release
  • Full Text Indexing in Ruby with Xapian Fu
  • MySQL slow query improvements

Archives

  • March 2010 (1)
  • February 2010 (3)
  • January 2010 (6)
  • December 2009 (4)
  • November 2009 (6)
  • October 2009 (2)
  • September 2009 (3)
  • August 2009 (4)
  • July 2009 (3)
  • June 2009 (3)
  • May 2009 (5)
  • April 2009 (4)
  • March 2009 (4)
  • February 2009 (3)
  • January 2009 (6)
  • December 2008 (8)
  • November 2008 (7)
  • October 2008 (8)
  • September 2008 (3)
  • August 2008 (5)
  • July 2008 (1)
  • June 2008 (4)
  • May 2008 (4)
  • April 2008 (3)
  • March 2008 (3)
  • February 2008 (3)
  • January 2008 (4)
  • December 2007 (4)
  • November 2007 (3)
  • October 2007 (1)
  • August 2007 (7)
  • July 2007 (1)
  • June 2007 (3)

Popular tags

    • announcements
    • apache
    • beta
    • deployment
    • hardy
    • packages
    • passenger
    • performance
    • phusion
    • rails
    • rails hosting
    • ruby
    • ruby on rails
    • security
    • ubuntu

Tag Cloud

announcements apache bandwidth beta brightbox brightbox gem conference control panel dapper debian deployment events features gem hardy hosting launch leeds linux london maintenance modrails mod_rails mysql network nginx packages passenger performance phusion pricing rack rails rails hosting ruby ruby on rails security staff team tech ubuntu uk updates upgrade xen

Posts tagged ‘rails 2.2’

Rails CSRF Security Vulnerability 19 Nov 08

Users of Rails 2.1 and 2.2 need to be aware of a vulnerability in Rails’ CSRF forgery protection.

For those that don’t know, Rails generates an authentication token within your forms and verifies this token when the form is submitted back to your application. This prevents attackers from crafting malicious requests whilst pretending to be your authenticated user.

However, for certain types of request (supposedly those that cannot be generated from a browser) this authentication token is ignored – in order to make it simpler for automated API access to your application (using JSON, XML or a few other data transport types). Unfortunately, text/plain is wrongly included as one of these types.

Luckily, the fix is simple. The long-term solution is to upgrade your application to Rails 2.1.3 or 2.2.2 (when they are released); the quick fix is even easier – tell Rails to verify text/plain requests by creating a file (called mime_type_csrf_fix.rb) in your config/initializers folder:


# temporary fix for http://www.rorsecurity.info/journal/2008/11/19/circumvent-rails-csrf-protection.html
Mime::Type.unverifiable_types.delete(:text)

Posted 19 November 2008 by Rahoul Baruah • 1 comment

csrf+ rails+ rails 2.1+ rails 2.2+ security

“uninitialized constant REXML::VERSION” with Rails 2.1.1 and Rails 2.2 10 Sep 08

We’ve found a minor problem with Rails 2.1.1 (and Rails 2.2) on our Brightboxes.

Because we use Ubuntu Dapper, which ships with Ruby 1.8.4, it includes an earlier version of the REXML library (for XML processing). As you may know, there was a recent security vulnerability to do with the REXML library and these latest two versions of Rails include a fix for this.

Unfortunately, the library that ships with 1.8.4 is slightly incorrect. Ruby conventions state that a constant should be all capitals so, quite rightly, the Rails updates check for a constant called REXML::VERSION. However, in 1.8.4, the constant is actually called REXML::Version meaning that Rails falls over with an “uninitialized constant REXML::VERSION” error.

The quick fix is to manually edit /usr/lib/ruby/1.8/rexml/rexml.rb and add a new (correctly named constant). You will need to use sudo to edit the file, as it is owned by root; after editing the file should look something like:


module REXML
        Copyright = "Copyright © 2001, 2002, 2003, 2004 Sean Russell <ser@germane-software.com>"
        Date = "2005/224"
        Version = "3.1.3"
        VERSION = "3.1.3"
end

We are also looking at our options for a permanent fix for this issue.

Posted 10 September 2008 by Rahoul Baruah • 6 comments

bugs+ rails+ rails 2.1.1+ rails 2.2+ rexml


Recent blog posts

  • Passenger 2.2.11 packages for Ubuntu 8.04 Hardy
    12 days ago
  • Passenger 2.2.10 packages for Ubuntu 8.04 Hardy
    19 days ago
  • Important announcement: Multiple users and accounts release
    about 1 month ago
  • Full Text Indexing in Ruby with Xapian Fu
    about 1 month ago
  • MySQL slow query improvements
    about 1 month ago
  • Brightbox Gem v2.3.6 released
    about 1 month ago

Join our email list

Flickr (more...)

RSS feeds

Blog feed

Flickr feed

Recent Wiki updates

System Status feed




Brightbox Partners and Vendors

Wiki | Forums | Terms & Conditions | Privacy | Site Map

Copyright © 2010 Brightbox Systems Ltd. All rights reserved