Skip to content

v2.0.27

Choose a tag to compare

@github-actions github-actions released this 02 Jul 16:03

What's changed

Fixes critical regressions introduced by PR #7 (streaming JSON parser for Overkiz device import):

Bug fixes

  • Silent empty device list on parse error — when the streaming JSON parser encountered an error (e.g. a field exceeding the 256-byte buffer), the error was not propagated and the import returned an empty success response instead of an error message
  • HTTP non-200 responses treated as success — a 401/403/500 from the Overkiz API returned ESP_OK to the caller because err held the TCP open result, not the HTTP status; the UI silently showed zero importable devices
  • fetch_headers() failure not detected — a TLS or network error during response header reception was ignored; err remained ESP_OK and the same silent-empty-success path was taken
  • HTTP handler returned non-ESP_OK after sending response — caused the httpd framework to abort the connection after the error JSON was already flushed, potentially corrupting the response or breaking keep-alive
  • JsonPathHandler dangling reference — the returned closure captured the callback parameter by reference; changed to capture by value to avoid undefined behaviour
  • JsonPath::startsWith null dereference — calling startsWith on a root-level path (JsonDoc, JsonObject, JsonArray) whose parent is nullptr would crash; added the same null guard present in endsWith and contains
  • JSON_PARSER_BUFFER_MAX_LENGTH raised 256 → 512 bytes — any string field in the Overkiz response longer than 255 bytes (e.g. in device definition command descriptors) would abort the entire import
  • Session cookie removed from logoverkiz_get was logging the full JSESSIONID value at INFO level