-
Notifications
You must be signed in to change notification settings - Fork 13.3k
add magic byte check for Update class #1259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Note: only check of first 0xE9 possible.
Is this going to break the case when |
good point will change. |
has the SPIFFS also a magic byte at the start? |
It has, but i think hard-coding this into Updater.cpp is not really good. It might be better to move that logic into some "Verifier" (i.e. MD5Verifier, SketchVerifier, SPIFFSVerifier, etc.) |
For SPIFFS the magic is not located at the start of the image: Arduino/cores/esp8266/spiffs/spiffs_nucleus.h Line 201 in 342c4ae
|
a verify at the beginning is limited to the first byte, (peek problem). for the sketch a verify at the end is possible since we not have override the working one there, |
Ok, then I think for SPIFFS we will just use MD5 verification at the end of update. |
will do some refactoring, start test for flash first byte, |
_verifyHeader is called before the beginning of the update progress to verify the first byte using peek _verifyEnd is called on the end before the eboot command is written to verify first byte + flash config add missing _reset() on timeout
updated |
LGTM |
add magic byte check for Update class
Note: only check of first 0xE9 possible.