mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #40112 from eliotsykes/patch-1
Resurrect doc explaining Basic Auth behavior [skip ci]
This commit is contained in:
commit
320f93c4d1
1 changed files with 2 additions and 0 deletions
|
@ -76,6 +76,8 @@ module ActionController
|
|||
|
||||
def http_basic_authenticate_or_request_with(name:, password:, realm: nil, message: nil)
|
||||
authenticate_or_request_with_http_basic(realm, message) do |given_name, given_password|
|
||||
# This comparison uses & so that it doesn't short circuit and
|
||||
# uses `secure_compare` so that length information isn't leaked.
|
||||
ActiveSupport::SecurityUtils.secure_compare(given_name, name) &
|
||||
ActiveSupport::SecurityUtils.secure_compare(given_password, password)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue