about summary refs log tree commit diff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-02-26 01:31:44 +0100
committerGitHub <noreply@github.com>2018-02-26 01:31:44 +0100
commit5cc716688abdf7eaafc58d804209510601190791 (patch)
tree26f2f13dbc2334f11d3673183a21c942148d8632 /app/models/user.rb
parentf0a1b1a152f8f46e2ff685b405d6361b7725f5ae (diff)
Ensure the app does not even start if OTP_SECRET is not set (#6557)
* Ensure the app does not even start if OTP_SECRET is not set

* Remove PAPERCLIP_SECRET (it's not used by anything, actually)

Imports are for internal consumption and the url option isn't even
used correctly, so we can remove the hash stuff from them
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index fcd574f8b..b053292da 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -44,7 +44,7 @@ class User < ApplicationRecord
   ACTIVE_DURATION = 14.days
 
   devise :two_factor_authenticatable,
-         otp_secret_encryption_key: ENV['OTP_SECRET']
+         otp_secret_encryption_key: ENV.fetch('OTP_SECRET')
 
   devise :two_factor_backupable,
          otp_number_of_backup_codes: 10