-
Notifications
You must be signed in to change notification settings - Fork 70
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
"Unknown" Error on login - Looks like password is too long #430
Comments
Hmm interesting, thanks for reporting it, @Lastof. We currently have no input length validation in neither https://github.com/leikoilja/gingernest nor in https://github.com/leikoilja/ha-google-home, but it would be nice to add. |
Notably the password was exactly 100 characters, and was able to login to google. From the errors I assume the issue is that a long email address + long password is meeting some issue with max length for the encryption algorithm (PKCS1_OAEP is throwing the error) before being sent out. For refrence throwing the email+pass into a utf-8 byte calculator (but with a space rather than the "\x00", since I'm not sure how to add a special character in the webpage I'm using) the length is 135 bytes. Not sure what the max could be (128 seems low, but there would need to be lots of encryption padding to reach 256). |
I may suggest using an App Password from Google? Those are shorter, and you won't have issues. See FAQs. Also, I don't recommend using your real password on any custom integration or third party product, so this would be a good security-aimed step. |
Advice on the app password is noted. Since this was a specifically created account for use with the intergration, rather than a "real" account, I went with not needing to link it to an authentication method. |
Okay, I understand. Then why not changing the password to 99 chars or something that works out? However, further investigation should be performed, or at least a check when logging in so this error does not occur. |
Describe the bug
When trying to add integration after entering User/Pass an "Unknown error occurred" error message appears. Looking at the HA Core logs the error in the logs section below appears, suggesting that the 100 character password I generated is being rejected by the cypher. Shortening the password bypassed the issue.
Version of the integration
If you are unsure about the version check the github release here.
Logs
The text was updated successfully, but these errors were encountered: