-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: plaintext is too long #17
Comments
Huh, that's a new one. Can you provide a traceback? I'm not sure off the top of my head where this would be coming from. |
I think I must have pasted my password more than once on accident. Can't reproduce with my actual password, but if I paste it 2-3 times:
Can probably close this unless it happens on someone's real password. |
Ah, ok, that makes sense. We can check the size of the key to find the max plaintext length, and see if anybody has looked into what Google does to handle longer plaintext (probably some kind of chunking?). |
I can reproduce this with a long password (64 characters long). |
Gotcha. There's a mention of an 80-char username+password limit in the blog post I based my code on, but it's not immediately clear to me how to work around it. |
Oops, that implementation suffers the same issue too! |
Just spent the last 30 minutes reverse-engineering the original Java source from Android from 2014, and it seems that it also has the 80 character combined limitation! I did some more research, and it looks like authentication has changed how it works for these services, as linking a Google account to your device uses this URL for setup now. I've not looked into how it stores the authentication token or uses it with Google Play Services though. |
Interesting. Nice work! |
Have you looked into this any further? Google has details about it's OAuth implementation at https://developers.google.com/identity/protocols/oauth2 |
I can reproduce this even with my "short" password (12 characters). I'm just following the instructions at the README: https://github.com/simon-weber/gpsoauth/blob/master/README.md#alternative-flow Here's my code (sanitized a bit, of course): email = '[email]'
token = '[oauth_token]'
android_id = '[device_id]'
print('perform_master_login')
master_response = gpsoauth.perform_master_login(email, token, android_id)
master_token = master_response['Token'] And here's the exception thrown with stack trace:
I have 2FA on - don't know if that matters using the oauth token, though |
@derekantrican is your email + password combination around 80 characters? The limit is for both combined. |
No. However, I think I found later that I should be using |
I have a pretty lengthy password and receive this exception when trying to login.
The text was updated successfully, but these errors were encountered: