fix(ota): Magic byte check fails with encrypted firmware (#9852)

This commit is contained in:
Me No Dev 2024-06-14 00:26:11 +03:00 committed by GitHub
parent 08ef62531d
commit a8ce679d81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) {