Encode special characters in password

This commit is contained in:
Remi Rampin
2016-09-06 14:27:47 -04:00
parent c1c9ce6dca
commit 9f861efccf

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')