diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-09-07 19:55:54 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-09-15 20:21:00 +0300 |
commit | 71aff7f6a3ab63f1395bfab6ea49f0175fe08167 (patch) | |
tree | fb5a26ecf10deeabdeb10f4950a43ee345086558 /lib/gitlab/auth.rb | |
parent | c144db2935f0f71c7f282a3015d126526bc16b57 (diff) |
Use special characters for `lfs+deploy-key` to prevent a someone from creating a user with this username, and method name refactoring.
Diffstat (limited to 'lib/gitlab/auth.rb')
-rw-r--r-- | lib/gitlab/auth.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb index 14e29124aac..f4e6ebb7bc7 100644 --- a/lib/gitlab/auth.rb +++ b/lib/gitlab/auth.rb @@ -115,7 +115,7 @@ module Gitlab def lfs_token_check(login, password) actor = - if login =~ /\Alfs-deploy-key-\d+\Z/ + if login =~ /\Alfs\+deploy-key-\d+\Z/ /\d+\Z/.match(login) do |id| DeployKey.find(id[0]) end |