Skip to content

Commit

Permalink
fix(ota): Magic byte check fails with encrypted firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
me-no-dev committed Jun 13, 2024
1 parent 1d895e5 commit b102cb6
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 b102cb6

Please sign in to comment.