mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #6521 from GDvalle/fix_ftp_urls
fetch_url: Avoid credential stripping for FTP-scheme URLs
This commit is contained in:
commit
f96568ab81
1 changed files with 1 additions and 1 deletions
|
@ -204,7 +204,7 @@ def fetch_url(module, url, data=None, headers=None, method=None,
|
||||||
ssl_handler = SSLValidationHandler(module, hostname, port)
|
ssl_handler = SSLValidationHandler(module, hostname, port)
|
||||||
handlers.append(ssl_handler)
|
handlers.append(ssl_handler)
|
||||||
|
|
||||||
if '@' in parsed[1]:
|
if parsed[0] != 'ftp' and '@' in parsed[1]:
|
||||||
credentials, netloc = parsed[1].split('@', 1)
|
credentials, netloc = parsed[1].split('@', 1)
|
||||||
if ':' in credentials:
|
if ':' in credentials:
|
||||||
username, password = credentials.split(':', 1)
|
username, password = credentials.split(':', 1)
|
||||||
|
|
Loading…
Reference in a new issue