1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

Merge pull request #6888 from wenottingham/quote-of-the-day

Ensure we quote '/' in username/password for SCM credentials.
This commit is contained in:
Bill Nottingham 2017-07-05 14:27:03 -04:00 committed by GitHub
commit fe46c6f3b3

View File

@ -256,7 +256,7 @@ def update_scm_url(scm_type, url, username=True, password=True,
netloc_password = '' netloc_password = ''
if netloc_username and parts.scheme != 'file' and scm_type != "insights": if netloc_username and parts.scheme != 'file' and scm_type != "insights":
netloc = u':'.join([urllib.quote(x) for x in (netloc_username, netloc_password) if x]) netloc = u':'.join([urllib.quote(x,safe='') for x in (netloc_username, netloc_password) if x])
else: else:
netloc = u'' netloc = u''
netloc = u'@'.join(filter(None, [netloc, parts.hostname])) netloc = u'@'.join(filter(None, [netloc, parts.hostname]))