summaryrefslogtreecommitdiff
path: root/app/models/hooks
diff options
context:
space:
mode:
authorJason Lee <huacnlee@gmail.com>2016-01-12 17:32:25 +0800
committerJason Lee <huacnlee@gmail.com>2016-01-12 18:20:03 +0800
commit932a247f5fb4a14b3e096ec88a73f8fce481eebb (patch)
treeb6006ac76347d46c484b755be8345925419769b4 /app/models/hooks
parent41bcab118ae8be1baee0d750d99f46f584bd2fd4 (diff)
downloadgitlab-ce-932a247f5fb4a14b3e096ec88a73f8fce481eebb.tar.gz
Use CGI.escape instead of URI.escape, because URI is obsoleted.
ref: https://github.com/ruby/ruby/commit/238b979f1789f95262a267d8df6239806f2859cc
Diffstat (limited to 'app/models/hooks')
-rw-r--r--app/models/hooks/web_hook.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb
index d0aadfc330a..3bb50c63cac 100644
--- a/app/models/hooks/web_hook.rb
+++ b/app/models/hooks/web_hook.rb
@@ -48,8 +48,8 @@ class WebHook < ActiveRecord::Base
else
post_url = url.gsub("#{parsed_url.userinfo}@", "")
auth = {
- username: URI.decode(parsed_url.user),
- password: URI.decode(parsed_url.password),
+ username: CGI.unescape(parsed_url.user),
+ password: CGI.unescape(parsed_url.password),
}
response = WebHook.post(post_url,
body: data.to_json,