Open NickStallman opened 1 year ago
I’ve been having the same issue with an ! Password.
never mind latest dev seems to fix everything.
I am having the exact same issue as you. Using the latest version.
If you go to the actual login page, does it work for you with the special characters? I don't see anything in the code where it's mangling it, but perhaps it's in there somewhere.
Yep @simbaja the real login page works fine with special characters.
Doing my poke around in the code, it looked like Python was interpreting the string at some stage which changed the password's value. I didn't identify where it got interpreted, just that what was sent to the server did not match what was entered in to the UI. The $ causes the password to truncate at that point - "abc$def" would be sent as "abc") and ! got escaped so "abc!def" got sent as "abc\!def".
Can you check the gehomesdk and run the included app? If it works there, it's something that perhaps home assistant is doing. If it doesn't then it's being mangled in there somewhere.
Looks like the issue is in gehomesdk too.
Modifying async_login_flows.py async_get_authorization_code
logging.debug("datastructure: %r", post_data)
With this test sample login:
gehome-appliance-data -u test@test.com -p "a$bc\!de"
Results in:
2023-01-23 12:43:58,570 DEBUG datastructure: {'signature': 'vVLoPdzS24__snipped out___', 'username': 'test@test.com', '_csrf': '943f0795-d62e-4772-b3a0-a4f8164e5d9f', 'password': 'a\\!de'}
So the password being sent isn't correct from the command line. This can be verified without logging in to a real account.
Ok, let me see if I can figure out where it's getting mangled, I don't see anything obvious, it's probably doing something in the background that I'm not aware of.
Confirmed same with *
and -
in password. Changed password to same length but no special characters and it worked fine
@NickStallman, sorry for the delay. Still not sure why HA isn't showing any devices, but at least figured out why your command line isn't working... there's a difference between single and double quotes (no idea why) try:
gehome-appliance-data -u 'test@test.com' -p 'a$bc\!de'
I noticed in VS.Code it actually turns different colors depending on the quotes used.
If that fixes your issue, can you try turning on debug logging in Home Assistant and see if anything pops up? And you were using the latest dev version, correct?
I think I had the same issue, changing the password without * fixed login.
I actually got my account booted out, and can't log in to the web interface at all no matter what. No error, just gives me the login screen again.
The app still works, but https://geapp.my.site.com/smarthq/s/login/ appears quite unusable.
I just tried again to re-authenticate and it seems to be working now. The web interface still seems dead to me.
My password uses some safer symbols like * and ^ which aren't part of escape sequences and should work fine.
I've just tried adding ha_gehome and it added just fine with the username and password, however no devices showed up and nothing appeared in logs.
Doing some further digging, I tried logging in with the gehome-appliance-data app and it also failed with output like this:
The full HTML login page is shown.
After some further poking around it seems it's because I used a Google generated password containing a
$
. The password was being truncated at the$
. Another attempt included a!
and it seems it might have gotten double escaped and also didn't work.So it seems there are a few issues here: