Permalink
Browse files

don't assume the http authorization header will be nil, since some co…

…nfigurations will pass it through as an empty string

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 0873678 commit 19ed709b09e7d942dadb285150a7b41225a2236f @jamis jamis committed May 11, 2007
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/lib/action_controller/http_authentication.rb
@@ -86,10 +86,10 @@ def request_http_basic_authentication(realm = "Application")
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 @@ def authentication_request(controller, realm)
end
end
end
-end
+end

0 comments on commit 19ed709

Please sign in to comment.