Fixed bug: Argon2 secret differs after app-reinitialization in test env.
This commit is contained in:
parent
dbcac7083c
commit
8d078e7398
1 changed files with 2 additions and 3 deletions
|
@ -50,11 +50,10 @@ module PasswordHash
|
|||
end
|
||||
|
||||
def argon2
|
||||
return @argon2 if @argon2
|
||||
@argon2 = Argon2::Password.new(secret: secret)
|
||||
@argon2 ||= Argon2::Password.new(secret: secret)
|
||||
end
|
||||
|
||||
def secret
|
||||
Setting.get('application_secret')
|
||||
@secret ||= Setting.get('application_secret')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue