diff options
author | James Lopez <james@jameslopez.es> | 2016-03-02 14:18:43 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-03-02 14:18:43 +0300 |
commit | 70623cd423b0c7e26e56422bf25c413d9921ee88 (patch) | |
tree | f977ca35d156db2d7a75fce165dd704f59818edb /app/models/project_services/ci_service.rb | |
parent | 8cba0612e16268ea12904e40ce7dad293998a875 (diff) |
fix token issue - timing attack
Diffstat (limited to 'app/models/project_services/ci_service.rb')
-rw-r--r-- | app/models/project_services/ci_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project_services/ci_service.rb b/app/models/project_services/ci_service.rb index e10b5529b42..f328deda354 100644 --- a/app/models/project_services/ci_service.rb +++ b/app/models/project_services/ci_service.rb @@ -26,7 +26,7 @@ class CiService < Service default_value_for :category, 'ci' def valid_token?(token) - self.respond_to?(:token) && self.token.present? && self.token == token + self.respond_to?(:token) && self.token.present? && ActiveSupport::SecurityUtils.secure_compare(token, self.token) end def supported_events |