Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
b64a825a9899
Commit
b64a825a
authored
Mar 08, 2016
by
James Lopez
Browse files
add SHA256 to secure_compare
parent
69d7f48761c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
b64a825a
...
...
@@ -908,9 +908,9 @@
end
def
valid_runners_token?
token
self
.
runners_token
&&
ActiveSupport
::
SecurityUtils
.
secure_compare
(
token
,
self
.
runners_token
)
self
.
runners_token
&&
ActiveSupport
::
SecurityUtils
.
variable_size_
secure_compare
(
token
,
self
.
runners_token
)
end
# TODO (ayufan): For now we use runners_token (backward compatibility)
# In 8.4 every build will have its own individual token valid for time of build
def
valid_build_token?
token
...
...
@@ -912,9 +912,9 @@
end
# TODO (ayufan): For now we use runners_token (backward compatibility)
# In 8.4 every build will have its own individual token valid for time of build
def
valid_build_token?
token
self
.
builds_enabled?
&&
self
.
runners_token
&&
ActiveSupport
::
SecurityUtils
.
secure_compare
(
token
,
self
.
runners_token
)
self
.
builds_enabled?
&&
self
.
runners_token
&&
ActiveSupport
::
SecurityUtils
.
variable_size_
secure_compare
(
token
,
self
.
runners_token
)
end
def
build_coverage_enabled?
...
...
app/models/project_services/ci_service.rb
View file @
b64a825a
...
...
@@ -26,7 +26,7 @@
default_value_for
:category
,
'ci'
def
valid_token?
(
token
)
self
.
respond_to?
(
:token
)
&&
self
.
token
.
present?
&&
ActiveSupport
::
SecurityUtils
.
secure_compare
(
token
,
self
.
token
)
self
.
respond_to?
(
:token
)
&&
self
.
token
.
present?
&&
ActiveSupport
::
SecurityUtils
.
variable_size_
secure_compare
(
token
,
self
.
token
)
end
def
supported_events
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment