dlarrick / pykumo

Python library to interact with Mitsubishi KumoCloud devices via their local API
MIT License
35 stars 12 forks source link

Double quote in password should be escaped #29

Closed dlarrick closed 2 years ago

dlarrick commented 2 years ago

See https://github.com/dlarrick/hass-kumo/issues/75#issuecomment-1155740011

This user had a password with a double-quote in it, which will result in early termination of the JSON string in the POST body.

https://github.com/dlarrick/pykumo/blob/master/pykumo/py_kumo_cloud_account.py#L76-L77 should be enhanced to replace a " in the password (and, I guess, username as well, but who does that) with \" prior to assembling the POST body.

ehagan commented 2 years ago

I changed my kumo cloud password back to one with a double quote in it and was able to fetch my units with this change.

dlarrick commented 2 years ago

I'll bump the version of pykumo in hass-kumo when it goes out of beta in a few days