From 9f861efccfb41ca480d9f179d79ad9b27d6c6de8 Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Tue, 6 Sep 2016 14:27:47 -0400 Subject: [PATCH] Encode special characters in password --- bin/github-backup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/github-backup b/bin/github-backup index b290de6..5c93ce2 100755 --- a/bin/github-backup +++ b/bin/github-backup @@ -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')