diff options
-rw-r--r-- | .rubocop.yml | 2 | ||||
-rw-r--r-- | app/controllers/omniauth_callbacks_controller.rb | 2 | ||||
-rw-r--r-- | app/models/ci/build.rb | 2 | ||||
-rw-r--r-- | app/models/project.rb | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 2d8eb4077f3..19a47804964 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -330,7 +330,7 @@ Style/MethodCallParentheses: # Checks if the method definitions have or don't have parentheses. Style/MethodDefParentheses: - Enabled: false + Enabled: true # Use the configured style when naming methods. Style/MethodName: diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb index df98f56a1cd..f35d631df0c 100644 --- a/app/controllers/omniauth_callbacks_controller.rb +++ b/app/controllers/omniauth_callbacks_controller.rb @@ -97,7 +97,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController handle_signup_error end - def handle_service_ticket provider, ticket + def handle_service_ticket(provider, ticket) Gitlab::OAuth::Session.create provider, ticket session[:service_tickets] ||= {} session[:service_tickets][provider] = ticket diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index ff7dd44c526..5e77fda70b9 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -286,7 +286,7 @@ module Ci project.runners_token end - def valid_token? token + def valid_token?(token) project.valid_runners_token? token end diff --git a/app/models/project.rb b/app/models/project.rb index f3a56b86d5a..c1d9bae44c9 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -946,13 +946,13 @@ class Project < ActiveRecord::Base shared_runners_enabled? && Ci::Runner.shared.active.any?(&block) end - def valid_runners_token? token + def valid_runners_token?(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 + def valid_build_token?(token) self.builds_enabled? && self.runners_token && ActiveSupport::SecurityUtils.variable_size_secure_compare(token, self.runners_token) end |