diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-18 03:24:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-18 03:24:03 +0300 |
commit | cfa5faaae0d9ac9a3c1fafb1a41e07b298029f48 (patch) | |
tree | b7ce1807d00c85cb94cbdc4a031562623e5343d6 /db/migrate | |
parent | ab5b519cca2356dd2b84a7fffc6ddbd6dc43a0ab (diff) |
Add latest changes from gitlab-org/gitlab@14-6-stable-ee
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20211126115449_encrypt_static_objects_external_storage_auth_token.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/db/migrate/20211126115449_encrypt_static_objects_external_storage_auth_token.rb b/db/migrate/20211126115449_encrypt_static_objects_external_storage_auth_token.rb index 9ce034b0065..92ba54d4c89 100644 --- a/db/migrate/20211126115449_encrypt_static_objects_external_storage_auth_token.rb +++ b/db/migrate/20211126115449_encrypt_static_objects_external_storage_auth_token.rb @@ -13,6 +13,8 @@ class EncryptStaticObjectsExternalStorageAuthToken < Gitlab::Database::Migration ApplicationSetting.reset_column_information ApplicationSetting.encrypted_token_is_null.plaintext_token_is_not_null.find_each do |application_setting| + next if application_setting.static_objects_external_storage_auth_token.empty? + token_encrypted = Gitlab::CryptoHelper.aes256_gcm_encrypt(application_setting.static_objects_external_storage_auth_token) application_setting.update!(static_objects_external_storage_auth_token_encrypted: token_encrypted) end |