Merge pull request #2549 from joaomilho/master

Using urlsafe_base64 cause it already handle url sensitive chars, keepin...
This commit is contained in:
José Valim
2013-08-08 13:38:05 -07:00

View File

@@ -458,7 +458,7 @@ module Devise
# Generate a friendly string randomly to be used as token.
def self.friendly_token
SecureRandom.base64(15).tr('+/=lIO0', 'pqrsxyz')
SecureRandom.urlsafe_base64(15).tr('lIO0', 'sxyz')
end
# constant-time comparison algorithm to prevent timing attacks