Skip to content

Commit

Permalink
fix(ota): Magic byte check fails with encrypted firmware (#9852)
Browse files Browse the repository at this point in the history
  • Loading branch information
me-no-dev authored Jun 13, 2024
1 parent 08ef625 commit a8ce679
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libraries/Update/src/Updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,11 @@ size_t UpdateClass::writeStream(Stream &data) {
return 0;
}

if (!_verifyHeader(data.peek())) {
_reset();
return 0;
if (_command == U_FLASH && !_cryptMode) {
if (!_verifyHeader(data.peek())) {
_reset();
return 0;
}
}

if (_ledPin != -1) {
Expand Down

0 comments on commit a8ce679

Please sign in to comment.