Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index a50ee4659a3..228a719fbdf 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -83,7 +83,7 @@ module API
end
def authenticate_by_gitlab_shell_token!
- unauthorized! unless secret_token == params['secret_token']
+ unauthorized! unless secret_token == params['secret_token'].try(:chomp)
end
def authenticated_as_admin!
@@ -236,7 +236,7 @@ module API
end
def secret_token
- File.read(Rails.root.join('.gitlab_shell_secret'))
+ File.read(Rails.root.join('.gitlab_shell_secret')).chomp
end
def handle_member_errors(errors)