diff options
author | Go MAEDA <maeda@farend.jp> | 2020-09-05 06:24:37 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-09-05 06:24:37 +0000 |
commit | 28dd747fc6e54dd07a5897d1936d97f976a5fef1 (patch) | |
tree | 0c8f33d747d92d9e5b3fb23d1eecfb4639992340 /lib/tasks | |
parent | 9b1b10620b568c8f2acd8e8906f18c0eb31e02b2 (diff) | |
download | redmine-28dd747fc6e54dd07a5897d1936d97f976a5fef1.tar.gz redmine-28dd747fc6e54dd07a5897d1936d97f976a5fef1.zip |
Rake tasks db:encrypt and db:decrypt now supports TOTP secret keys (#1237, #33929).
git-svn-id: http://svn.redmine.org/redmine/trunk@20005 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/ciphering.rake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/tasks/ciphering.rake b/lib/tasks/ciphering.rake index 07e96b5d6..fb97cde30 100644 --- a/lib/tasks/ciphering.rake +++ b/lib/tasks/ciphering.rake @@ -20,7 +20,8 @@ namespace :db do desc 'Encrypts SCM and LDAP passwords in the database.' task :encrypt => :environment do unless (Repository.encrypt_all(:password) && - AuthSource.encrypt_all(:account_password)) + AuthSource.encrypt_all(:account_password) && + User.encrypt_all(:twofa_totp_key)) raise "Some objects could not be saved after encryption, update was rolled back." end end @@ -28,7 +29,8 @@ namespace :db do desc 'Decrypts SCM and LDAP passwords in the database.' task :decrypt => :environment do unless (Repository.decrypt_all(:password) && - AuthSource.decrypt_all(:account_password)) + AuthSource.decrypt_all(:account_password) && + User.decrypt_all(:twofa_totp_key)) raise "Some objects could not be saved after decryption, update was rolled back." end end |