mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
08736788c9
commit
19ed709b09
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue