From 3029a4e7357cfda53bc825b391c9b977ecc39b16 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Sep 2025 12:13:03 +0000 Subject: [PATCH 1/6] Implement OTA release compatibility checking system Implement a comprehensive solution for validating a firmware before an OTA updated is committed. WLED metadata such as version and release is moved to a data structure located at near the start of the firmware binary, where it can be identified and validated. Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com> --- tools/cdata.js | 6 - wled00/data/update.htm | 26 +++- wled00/e131.cpp | 2 +- wled00/ota_update.cpp | 252 +++++++++++++++++++++++++++++++++++++++ wled00/ota_update.h | 52 ++++++++ wled00/wled.cpp | 5 +- wled00/wled.h | 11 +- wled00/wled_metadata.cpp | 144 ++++++++++++++++++++++ wled00/wled_metadata.h | 71 +++++++++++ wled00/wled_server.cpp | 73 ++++++------ wled00/xml.cpp | 7 -- 11 files changed, 582 insertions(+), 67 deletions(-) create mode 100644 wled00/ota_update.cpp create mode 100644 wled00/ota_update.h create mode 100644 wled00/wled_metadata.cpp create mode 100644 wled00/wled_metadata.h diff --git a/tools/cdata.js b/tools/cdata.js index c5d3c6aa52..1381cd240f 100644 --- a/tools/cdata.js +++ b/tools/cdata.js @@ -370,12 +370,6 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()====="; name: "PAGE_update", method: "gzip", filter: "html-minify", - mangle: (str) => - str - .replace( - /function GetV().*\<\/script\>/gms, - "" - ) }, { file: "welcome.htm", diff --git a/wled00/data/update.htm b/wled00/data/update.htm index cb439c4e04..76ed96de7b 100644 --- a/wled00/data/update.htm +++ b/wled00/data/update.htm @@ -6,7 +6,26 @@