Permalink
Browse files

Use SHA1 instead of MD5 in the HTTP basic example

  • Loading branch information...
1 parent f599c58 commit c86e797070972c78868eebb2ffa8e71a3dbaca75 @toretore toretore committed Nov 9, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/doc/guides/source/actioncontroller_basics/http_auth.txt
View
4 railties/doc/guides/source/actioncontroller_basics/http_auth.txt
@@ -6,15 +6,15 @@ Rails comes with built-in HTTP Basic authentication. This is an authentication s
-------------------------------------
class AdminController < ApplicationController
- USERNAME, PASSWORD = "humbaba", "f59a4805511bf4bb61978445a5380c6c"
+ USERNAME, PASSWORD = "humbaba", "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8"
before_filter :authenticate
private
def authenticate
authenticate_or_request_with_http_basic do |username, password|
- username == USERNAME && Digest::MD5.hexdigest(password) == PASSWORD
+ username == USERNAME && Digest::SHA1.hexdigest(password) == PASSWORD
end
end

0 comments on commit c86e797

Please sign in to comment.