From f706c6cbed28198b0bcf739518fd566786a0752a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Sep 2025 16:16:42 +0000 Subject: [PATCH] Rename ignoreRelease to skipValidation in OTA validation system Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com> --- wled00/data/update.htm | 4 ++-- wled00/ota_release_check.cpp | 4 ++-- wled00/ota_release_check.h | 4 ++-- wled00/wled_server.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/wled00/data/update.htm b/wled00/data/update.htm index fd82372ff..d4148723d 100644 --- a/wled00/data/update.htm +++ b/wled00/data/update.htm @@ -33,8 +33,8 @@ style="vertical-align: text-bottom; display: inline-flex;">

- -
+ +



diff --git a/wled00/ota_release_check.cpp b/wled00/ota_release_check.cpp index ae9ddcac0..59b33c367 100644 --- a/wled00/ota_release_check.cpp +++ b/wled00/ota_release_check.cpp @@ -77,7 +77,7 @@ bool validateReleaseCompatibility(const char* extractedRelease) { return match; } -bool shouldAllowOTA(const uint8_t* binaryData, size_t dataSize, bool ignoreReleaseCheck, char* errorMessage) { +bool shouldAllowOTA(const uint8_t* binaryData, size_t dataSize, bool skipValidation, char* errorMessage) { // Clear error message if (errorMessage) { errorMessage[0] = '\0'; @@ -88,7 +88,7 @@ bool shouldAllowOTA(const uint8_t* binaryData, size_t dataSize, bool ignoreRelea (void)local_desc; // Suppress unused variable warning // If user chose to ignore release check, allow OTA - if (ignoreReleaseCheck) { + if (skipValidation) { DEBUG_PRINTLN(F("OTA release check bypassed by user")); return true; } diff --git a/wled00/ota_release_check.h b/wled00/ota_release_check.h index 7ccb5f7a9..fe2ade1ad 100644 --- a/wled00/ota_release_check.h +++ b/wled00/ota_release_check.h @@ -48,11 +48,11 @@ bool validateReleaseCompatibility(const char* extractedRelease); * Check if OTA should be allowed based on release compatibility using custom description * @param binaryData Pointer to binary file data (not modified) * @param dataSize Size of binary data in bytes - * @param ignoreReleaseCheck If true, skip release validation + * @param skipValidation If true, skip release validation * @param errorMessage Buffer to store error message if validation fails (should be at least 128 bytes) * @return true if OTA should proceed, false if it should be blocked */ -bool shouldAllowOTA(const uint8_t* binaryData, size_t dataSize, bool ignoreReleaseCheck, char* errorMessage); +bool shouldAllowOTA(const uint8_t* binaryData, size_t dataSize, bool skipValidation, char* errorMessage); /** * Get pointer to the embedded custom description structure diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index 32e0d5978..226ee542b 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -433,11 +433,11 @@ void initServer() DEBUG_PRINTLN(F("OTA Update Start")); // Check if user wants to ignore release check - bool ignoreRelease = request->hasParam("ignoreRelease", true); + bool skipValidation = request->hasParam("skipValidation", true); // Validate OTA release compatibility using the first chunk data directly char errorMessage[128]; - releaseCheckPassed = shouldAllowOTA(data, len, ignoreRelease, errorMessage); + releaseCheckPassed = shouldAllowOTA(data, len, skipValidation, errorMessage); if (!releaseCheckPassed) { DEBUG_PRINTF_P(PSTR("OTA blocked: %s\n"), errorMessage);