diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-03-06 15:18:53 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-03-06 15:18:53 +0300 |
commit | c5f1f7f3dbd5e7094ae3f30823d6c87b7a72121d (patch) | |
tree | 0123c4e12a3a79d69c3c791c9cc797e577f5c822 /lib/gitlab/background_migration | |
parent | f100c9ba158a0ab6f4edaa1de73e107737d4a9d0 (diff) |
Use encrypted runner tokens
This makes code to support encrypted runner tokens.
This code also finished previously started encryption
process.
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r-- | lib/gitlab/background_migration/encrypt_columns.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/encrypt_columns.rb b/lib/gitlab/background_migration/encrypt_columns.rb index b9ad8267e37..173543b7c25 100644 --- a/lib/gitlab/background_migration/encrypt_columns.rb +++ b/lib/gitlab/background_migration/encrypt_columns.rb @@ -91,7 +91,8 @@ module Gitlab # No need to do anything if the plaintext is nil, or an encrypted # value already exists - return nil unless plaintext.present? && !ciphertext.present? + return unless plaintext.present? + return if ciphertext.present? # attr_encrypted will calculate and set the expected value for us instance.public_send("#{plain_column}=", plaintext) # rubocop:disable GitlabSecurity/PublicSend |