Merge pull request #46 from remram44/encode-password

Encode special characters in password
This commit is contained in:
Jose Diaz-Gonzalez
2016-09-06 14:31:35 -04:00
committed by GitHub

View File

@@ -243,7 +243,11 @@ def get_auth(args, encode=True):
elif args.username:
if not args.password:
args.password = getpass.getpass()
auth = args.username + ':' + args.password
if encode:
password = args.password
else:
password = urllib.quote(args.password)
auth = args.username + ':' + password
elif args.password:
log_error('You must specify a username for basic auth')