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
Seeedstudio ESP32S3 Sense but any Espressif device
Hardware Configuration
No
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
Windows 10
Flash frequency
40Mhz
PSRAM enabled
yes
Upload speed
115200
Description
When requesting a firmware update from a remote OTA server using HttpUpdate the remote server returns an expected MD5 in header "x-MD5" as a 32 char hex string. If received HttpUpdate passes this to Update object for comparison with an internally computed MD5 calculated using MD5Builder.
Update stores the expected MD5 using UpdateClass::setMD5(). OTA servers built on .Net will send MD5 as uppercase hex strings by default. In UpdateClass::end() the actual MD5 of the received firmware is compared with the expected MD5 and it fails because of case difference.
UpdateClass::setMD5() should not assume lowercase hex characters and should downcase the expected MD5 before storing to the _target_md5 member variable.
This was raised earlier as Issue #4641 Uppercase MD5 gets rejected but was closed due to inaction.
Hi @jksemple, thank you for opening this issue once again. Feel free to open a PR with the proposed fix: "UpdateClass::setMD5() should not assume lowercase hex characters and should downcase the expected MD5 before storing to the _target_md5 member variable."
Uh oh!
There was an error while loading. Please reload this page.
Board
ESP32 ESP32S3 ESP8266 etc
Device Description
Seeedstudio ESP32S3 Sense but any Espressif device
Hardware Configuration
No
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
Windows 10
Flash frequency
40Mhz
PSRAM enabled
yes
Upload speed
115200
Description
When requesting a firmware update from a remote OTA server using HttpUpdate the remote server returns an expected MD5 in header "x-MD5" as a 32 char hex string. If received HttpUpdate passes this to Update object for comparison with an internally computed MD5 calculated using MD5Builder.
Update stores the expected MD5 using UpdateClass::setMD5(). OTA servers built on .Net will send MD5 as uppercase hex strings by default. In UpdateClass::end() the actual MD5 of the received firmware is compared with the expected MD5 and it fails because of case difference.
UpdateClass::setMD5() should not assume lowercase hex characters and should downcase the expected MD5 before storing to the _target_md5 member variable.
This was raised earlier as Issue #4641 Uppercase MD5 gets rejected but was closed due to inaction.
Sketch
Debug Message
Other Steps to Reproduce
The problem goes away if the remote server downcases the value in the "x-MD5" header before returning it.
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: