fix(ota): Magic byte check fails with encrypted firmware (#9852)
This commit is contained in:
parent
08ef62531d
commit
a8ce679d81
1 changed files with 5 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue