From 77229553a3e22fb2f404eb064397875b5268ad0c Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Sun, 16 Mar 2014 20:41:03 -0500 Subject: [PATCH] fetch_url: Avoid credential stripping for FTP-scheme URLs --- lib/ansible/module_utils/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index 053dfc041c8..41b1135855f 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -204,7 +204,7 @@ def fetch_url(module, url, data=None, headers=None, method=None, ssl_handler = SSLValidationHandler(module, hostname, port) handlers.append(ssl_handler) - if '@' in parsed[1]: + if parsed[0] != 'ftp' and '@' in parsed[1]: credentials, netloc = parsed[1].split('@', 1) if ':' in credentials: username, password = credentials.split(':', 1)