You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
I observed while testing OTA upgrade (using lib OTA.py), that the hash for a specific file was always incorrectly calculated by the OTA.py.
In fact, the issue is that the stripping of HTML header in "get_data()" function does not properly work if the "result" contains more than 1 "\r\n\r\n". result = result.decode().split("\r\n\r\n")[1].encode()
To be replaced with something like:
index = result.decode().find("\r\n\r\n")
result = result[index+4:]
This issue can be reproduced by running the OTA server and making sure that a file containing "\r\n\r\n" (2 empty lines on top, or 1 empty line between 2 statements) needs to be downloaded and hash-verified.
The text was updated successfully, but these errors were encountered:
Issue:
I observed while testing OTA upgrade (using lib OTA.py), that the hash for a specific file was always incorrectly calculated by the OTA.py.
In fact, the issue is that the stripping of HTML header in "get_data()" function does not properly work if the "result" contains more than 1 "\r\n\r\n".
result = result.decode().split("\r\n\r\n")[1].encode()
To be replaced with something like:
This issue can be reproduced by running the OTA server and making sure that a file containing "\r\n\r\n" (2 empty lines on top, or 1 empty line between 2 statements) needs to be downloaded and hash-verified.
The text was updated successfully, but these errors were encountered: