mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Merge pull request #1087 from eMxyzptlk/patch-2
Rails has removed SecureRandom from ActiveSupport in Rails 3.2, deprecated
This commit is contained in:
commit
acd1c76c3b
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ require 'active_support/core_ext/numeric/time'
|
|||
require 'active_support/dependencies'
|
||||
require 'orm_adapter'
|
||||
require 'set'
|
||||
require 'securerandom'
|
||||
|
||||
module Devise
|
||||
autoload :FailureApp, 'devise/failure_app'
|
||||
|
@ -402,7 +403,7 @@ module Devise
|
|||
|
||||
# Generate a friendly string randomically to be used as token.
|
||||
def self.friendly_token
|
||||
ActiveSupport::SecureRandom.base64(15).tr('+/=', 'xyz')
|
||||
SecureRandom.base64(15).tr('+/=', 'xyz')
|
||||
end
|
||||
|
||||
# constant-time comparison algorithm to prevent timing attacks
|
||||
|
|
Loading…
Reference in a new issue