mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
81a2caee36e2ad3d774b020141ae70cdcf870107
If a captive_portal or web_server OTA upload is interrupted mid-stream (e.g. TCP connection reset), the shared OTARequestHandler's ota_backend_ is left open. When the browser resends the multipart POST, the guard 'index == 0 && !ota_backend_' skipped re-initialization, so new bytes were written at the previous session's offset. The Updater's end() then reports success with a concatenated image in flash, bricking the device on reboot. Abort and reset any in-progress backend whenever a new multipart upload starts (index == 0) so the fresh upload begins a clean OTA session.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
546 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
