diff options
author | Jamis Buck <jamis@37signals.com> | 2007-05-11 16:30:57 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2007-05-11 16:30:57 +0000 |
commit | 19ed709b09e7d942dadb285150a7b41225a2236f (patch) | |
tree | a933e0ae7f098ba9139f0f738c9e1be4e8ff7258 /actionpack/lib | |
parent | 08736788c906d2b05fe6c45e6922e594149c9b12 (diff) | |
download | rails-19ed709b09e7d942dadb285150a7b41225a2236f.tar.gz rails-19ed709b09e7d942dadb285150a7b41225a2236f.tar.bz2 rails-19ed709b09e7d942dadb285150a7b41225a2236f.zip |
don't assume the http authorization header will be nil, since some configurations will pass it through as an empty string
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/http_authentication.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/http_authentication.rb b/actionpack/lib/action_controller/http_authentication.rb index 269858633e..fbc34d1f2e 100644 --- a/actionpack/lib/action_controller/http_authentication.rb +++ b/actionpack/lib/action_controller/http_authentication.rb @@ -86,10 +86,10 @@ module ActionController end def authenticate(controller, &login_procedure) - if authorization(controller.request) - login_procedure.call(*user_name_and_password(controller.request)) - else + if authorization(controller.request).blank? false + else + login_procedure.call(*user_name_and_password(controller.request)) end end @@ -118,4 +118,4 @@ module ActionController end end end -end
\ No newline at end of file +end |