diff --git a/README.md b/README.md index 004c48b2ca..6f0ce47fb6 100644 --- a/README.md +++ b/README.md @@ -3189,14 +3189,13 @@ applies to the current namespace and any children, but not parents. ```ruby http_basic do |username, password| # verify user's password here - { 'test' => 'password1' }[username] == password + # IMPORTANT: make sure you use a comparison method which isn't prone to a timing attack end ``` ```ruby http_digest({ realm: 'Test Api', opaque: 'app secret' }) do |username| # lookup the user's password here - { 'user1' => 'password1' }[username] end ```