summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-12-20 17:26:21 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-12-20 17:26:21 +0800
commite7b0fe36d78a4462baf623bda5d34089a19e6c23 (patch)
treeb18cab1f41246ab170d8988a4643daa04667c919
parent5b880f0d36b082a0b443c5fe95f51a84dee27475 (diff)
downloadgitlab-ce-qa-fix-escape-password-spaces.tar.gz
It should escape spaces to %20 rather than +qa-fix-escape-password-spaces
`CGI.escape` would escape spaces to +, which is fine in some cases, but doesn't work for git clone.
-rw-r--r--qa/qa/git/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/qa/qa/git/repository.rb b/qa/qa/git/repository.rb
index 59cd147e055..8f999511d58 100644
--- a/qa/qa/git/repository.rb
+++ b/qa/qa/git/repository.rb
@@ -23,7 +23,7 @@ module QA
def password=(pass)
@password = pass
- @uri.password = CGI.escape(pass)
+ @uri.password = CGI.escape(pass).gsub('+', '%20')
end
def use_default_credentials