mirror of
https://github.com/necronicle/z2k.git
synced 2026-04-26 10:31:30 +00:00
Two defenses for the same class of bug: 1. read_flag now falls back to the default when the matched line has an empty value (e.g. `ROBLOX_UDP_BYPASS=` with nothing after the equals sign). Previously only an entirely missing key triggered the default; a present-but-empty key propagated as "". Combined with the next fix the API now stays consistent regardless of how the config got into that state. 2. JSON template in the /status handler quotes toggle values (`"key":"%s"` instead of `"key":%s`). Without quotes an empty %s collapses to `:,` mid-object and breaks JSON.parse on the frontend. With quotes the worst case is `""` which parses fine. Frontend already compares with `=== "1"` so it expects strings anyway — this also makes the kind=good/warn highlight actually work (previously `0 === "1"` was always false). Reported by Алексей @Guf3477452 2026-04-18 after a reinstall: webpanel crashed on `Unexpected token ',', ..."ame_mode":,"customd"...`. Same shape as the 2026-04-15 bug fixed on z2k-enhanced — backport. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cgi | ||
| init.d | ||
| www | ||
| install.sh | ||
| lighttpd.conf | ||
| uninstall.sh | ||