From b70b72b6b0d369c0c6f38b6986bae14d22542b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 15 Nov 2010 10:01:45 +0100 Subject: [PATCH] Rollback to use the regexp result. --- Gemfile | 2 +- Gemfile.lock | 50 ++++++++++++------------ lib/devise/strategies/authenticatable.rb | 4 +- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Gemfile b/Gemfile index 698068c2..1c7b1f1e 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "http://rubygems.org" gemspec -gem "rails" +gem "rails", "3.0.1" gem "webrat", "0.7.1" gem "mocha", :require => false gem "oa-oauth", :require => "omniauth/oauth" diff --git a/Gemfile.lock b/Gemfile.lock index b4267975..96117c9f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,12 +10,12 @@ GEM remote: http://rubygems.org/ specs: abstract (1.0.0) - actionmailer (3.0.0) - actionpack (= 3.0.0) + actionmailer (3.0.1) + actionpack (= 3.0.1) mail (~> 2.2.5) - actionpack (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) + actionpack (3.0.1) + activemodel (= 3.0.1) + activesupport (= 3.0.1) builder (~> 2.1.2) erubis (~> 2.6.6) i18n (~> 0.4.1) @@ -23,23 +23,23 @@ GEM rack-mount (~> 0.6.12) rack-test (~> 0.5.4) tzinfo (~> 0.3.23) - activemodel (3.0.0) - activesupport (= 3.0.0) + activemodel (3.0.1) + activesupport (= 3.0.1) builder (~> 2.1.2) i18n (~> 0.4.1) - activerecord (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) + activerecord (3.0.1) + activemodel (= 3.0.1) + activesupport (= 3.0.1) arel (~> 1.0.0) tzinfo (~> 0.3.23) activerecord-jdbc-adapter (1.0.2-java) activerecord-jdbcsqlite3-adapter (1.0.2-java) activerecord-jdbc-adapter (= 1.0.2) jdbc-sqlite3 (~> 3.6.0) - activeresource (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) - activesupport (3.0.0) + activeresource (3.0.1) + activemodel (= 3.0.1) + activesupport (= 3.0.1) + activesupport (3.0.1) addressable (2.2.2) arel (1.0.1) activesupport (~> 3.0.0) @@ -104,17 +104,17 @@ GEM ruby-openid (>= 2.1.8) rack-test (0.5.6) rack (>= 1.0) - rails (3.0.0) - actionmailer (= 3.0.0) - actionpack (= 3.0.0) - activerecord (= 3.0.0) - activeresource (= 3.0.0) - activesupport (= 3.0.0) + rails (3.0.1) + actionmailer (= 3.0.1) + actionpack (= 3.0.1) + activerecord (= 3.0.1) + activeresource (= 3.0.1) + activesupport (= 3.0.1) bundler (~> 1.0.0) - railties (= 3.0.0) - railties (3.0.0) - actionpack (= 3.0.0) - activesupport (= 3.0.0) + railties (= 3.0.1) + railties (3.0.1) + actionpack (= 3.0.1) + activesupport (= 3.0.1) rake (>= 0.8.4) thor (~> 0.14.0) rake (0.8.7) @@ -155,7 +155,7 @@ DEPENDENCIES oa-oauth oa-openid orm_adapter (~> 0.0.2) - rails + rails (= 3.0.1) ruby-debug (>= 0.10.3) sqlite3-ruby warden (~> 1.0.2) diff --git a/lib/devise/strategies/authenticatable.rb b/lib/devise/strategies/authenticatable.rb index 041cb9b0..02573786 100644 --- a/lib/devise/strategies/authenticatable.rb +++ b/lib/devise/strategies/authenticatable.rb @@ -96,8 +96,8 @@ module Devise # Helper to decode credentials from HTTP. def decode_credentials - return [] unless request.authorization && request.authorization =~ /^Basic (.*)/ - ActiveSupport::Base64.decode64(request.authorization.split(' ', 2).last).split(/:/, 2) + return [] unless request.authorization && request.authorization =~ /^Basic (.*)/m + ActiveSupport::Base64.decode64($1).split(/:/, 2) end # Sets the authentication hash and the password from params_auth_hash or http_auth_hash.