mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 22:51:03 +02:00
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:
parent
642382095d
commit
138904ef93
@ -26,11 +26,11 @@ def Authenticate():
|
|||||||
passwd = os.environ.get('GSDCURL_PASSWORD')
|
passwd = os.environ.get('GSDCURL_PASSWORD')
|
||||||
if passwd is None:
|
if passwd is None:
|
||||||
sys.stderr.write('Password: ')
|
sys.stderr.write('Password: ')
|
||||||
passwd = urllib.quote_plus(getpass.getpass(prompt=''))
|
passwd = getpass.getpass(prompt='')
|
||||||
cmd = [
|
cmd = [
|
||||||
'curl', '--silent', 'https://www.google.com/accounts/ClientLogin',
|
'curl', '--silent', 'https://www.google.com/accounts/ClientLogin',
|
||||||
'-d', 'Email=' + username,
|
'-d', 'Email=' + username,
|
||||||
'-d', 'Passwd=' + passwd,
|
'-d', 'Passwd=' + urllib.quote_plus(passwd),
|
||||||
'-d', 'accountType=GOOGLE',
|
'-d', 'accountType=GOOGLE',
|
||||||
'-d', 'source=Google-gsdcurl-ver1',
|
'-d', 'source=Google-gsdcurl-ver1',
|
||||||
'-d', 'service=cds',
|
'-d', 'service=cds',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user