From 41ac7c4d960552cf13f394183536693a4580ce4e Mon Sep 17 00:00:00 2001 From: Chris Church Date: Tue, 16 Dec 2014 14:38:50 -0500 Subject: [PATCH] Allow space in SCM password. Fixes https://trello.com/c/KaqasZPa --- awx/main/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/main/utils.py b/awx/main/utils.py index cf5f16a309..5e90c33d38 100644 --- a/awx/main/utils.py +++ b/awx/main/utils.py @@ -10,6 +10,7 @@ import re import subprocess import stat import sys +import urllib import urlparse import threading import contextlib @@ -235,7 +236,7 @@ def update_scm_url(scm_type, url, username=True, password=True, netloc_password = '' if netloc_username and parts.scheme != 'file': - netloc = u':'.join(filter(None, [netloc_username, netloc_password])) + netloc = u':'.join([urllib.quote(x) for x in (netloc_username, netloc_password) if x]) else: netloc = u'' netloc = u'@'.join(filter(None, [netloc, parts.hostname]))