summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-27 15:21:23 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-27 15:21:23 +0100
commit7d2b37bc48ca3963c241f384c8f2df6e937c74d6 (patch)
tree591fc8e1ebb6c98c1b81b9fde08d337133cf16f8
parent37add27a00d38e4edaaec945ed9f44a123523884 (diff)
downloadgitlab-ce-7d2b37bc48ca3963c241f384c8f2df6e937c74d6.tar.gz
Fix resetting old token when fallback strategy is provided
-rw-r--r--app/models/concerns/token_authenticatable_strategies/encrypted.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/token_authenticatable_strategies/encrypted.rb b/app/models/concerns/token_authenticatable_strategies/encrypted.rb
index c23d78b050a..ab64dfca820 100644
--- a/app/models/concerns/token_authenticatable_strategies/encrypted.rb
+++ b/app/models/concerns/token_authenticatable_strategies/encrypted.rb
@@ -46,7 +46,7 @@ module TokenAuthenticatableStrategies
raise ArgumentError unless token.present?
instance[encrypted_field] = Gitlab::CryptoHelper.aes256_gcm_encrypt(token)
- fallback_strategy.set_token(instance, nil) if fallback?
+ instance[token_field] = nil if fallback?
token
end