Skip to content

Commit

Permalink
fix user/pass encoding in cloud key retrieve(#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
krahabb committed Jul 6, 2022
1 parent 9bed6cd commit 0e563ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/meross_lan/merossclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async def async_get_cloud_key(username, password, session: aiohttp.client.Client
session = session or aiohttp.ClientSession()
timestamp = int(time())
nonce = uuid4().hex
params = '{"email": "'+username+'", "password": "'+password+'"}'
params = json_dumps({"email": username, "password": password})
params = b64encode(params.encode('utf-8')).decode('ascii')
sign = md5(("23x17ahWarFH6w29" + str(timestamp) + nonce + params).encode('utf-8')).hexdigest()
with async_timeout.timeout(10):
Expand Down

0 comments on commit 0e563ed

Please sign in to comment.