summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-18 14:58:20 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-18 14:58:20 -0800
commit558dd811971776fc4a921b79296f5d792b245686 (patch)
tree03276f73e69391fe8f9377f7d672cb2dd8ea710e /lib/api/helpers.rb
parent833d4dddf2fc3a933a28b4deb60ef6a3dc7eb0fb (diff)
downloadgitlab-ce-558dd811971776fc4a921b79296f5d792b245686.tar.gz
Improve broadcast message API
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)