Fix gsdcurl to correctly URL-quote a password passed via GSDCURL_PASSWORD

BUG=none
TEST=use this script with a (correct) password that includes punctuation such as one of these: $&+,/:;=?@

Review URL: http://codereview.chromium.org/3058046
This commit is contained in:
J. Richard Barnette 2010-08-05 11:03:37 -07:00
parent 642382095d
commit 138904ef93

View File

@ -26,11 +26,11 @@ def Authenticate():
passwd = os.environ.get('GSDCURL_PASSWORD')
if passwd is None:
sys.stderr.write('Password: ')
passwd = urllib.quote_plus(getpass.getpass(prompt=''))
passwd = getpass.getpass(prompt='')
cmd = [
'curl', '--silent', 'https://www.google.com/accounts/ClientLogin',
'-d', 'Email=' + username,
'-d', 'Passwd=' + passwd,
'-d', 'Passwd=' + urllib.quote_plus(passwd),
'-d', 'accountType=GOOGLE',
'-d', 'source=Google-gsdcurl-ver1',
'-d', 'service=cds',