Fixed bug: Argon2 secret differs after app-reinitialization in test env.

This commit is contained in:
Thorsten Eckel 2018-09-28 14:14:46 +02:00
parent dbcac7083c
commit 8d078e7398

View file

@ -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