Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2018-12-17 09:17:39 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2018-12-17 09:17:39 +0300
commit8ce86bf9a06dd656479ce2cd50757c78c5b01a9d (patch)
tree3719934562fe0c68dba73f0ba563bd3807e3819b /lib/gitlab/auth.rb
parent8b4602041cf2c4a8738a4796d78720017249249f (diff)
Revert "Revert "LfsToken uses JSONWebToken::HMACToken by default""
This reverts commit 00acef434031b5dc0bf39576a9e83802c7806842.
Diffstat (limited to 'lib/gitlab/auth.rb')
-rw-r--r--lib/gitlab/auth.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb
index 6eb5f9e2300..7aa02009aa0 100644
--- a/lib/gitlab/auth.rb
+++ b/lib/gitlab/auth.rb
@@ -199,7 +199,7 @@ module Gitlab
end
# rubocop: enable CodeReuse/ActiveRecord
- def lfs_token_check(login, password, project)
+ def lfs_token_check(login, encoded_token, project)
deploy_key_matches = login.match(/\Alfs\+deploy-key-(\d+)\z/)
actor =
@@ -222,7 +222,7 @@ module Gitlab
read_authentication_abilities
end
- if Devise.secure_compare(token_handler.token, password)
+ if token_handler.token_valid?(encoded_token)
Gitlab::Auth::Result.new(actor, nil, token_handler.type, authentication_abilities)
end
end