提交 8d9823ab 编写于 作者: R Robert Schilling

Merge pull request #8928 from Mic92/master

use constant-time string compare for internal api authentication
......@@ -83,7 +83,10 @@ module API
end
def authenticate_by_gitlab_shell_token!
unauthorized! unless secret_token == params['secret_token'].try(:chomp)
input = params['secret_token'].try(:chomp)
unless Devise.secure_compare(secret_token, input)
unauthorized!
end
end
def authenticated_as_admin!
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册