luci-base: fix ubus getFeatures() crash
authorJo-Philipp Wich <redacted>
Wed, 1 Apr 2026 11:11:14 +0000 (13:11 +0200)
committerJo-Philipp Wich <redacted>
Wed, 1 Apr 2026 11:11:14 +0000 (13:11 +0200)
OpenWrt versions that provide odhcpd versions reporting a compile time
features line in their help output trigger a crash in the getFeatures()
procedure (attempt to set property on boolean value) - fix this issue
by not predeclaring the odhcpd flag as `false`.

Fixes: #8489
Fixes: 0529dca7a2 ("luci-base: fix feature detection patterns")
Signed-off-by: Jo-Philipp Wich <redacted>
modules/luci-base/root/usr/share/rpcd/ucode/luci

index 511853cd71decf660761af666020e31f50acb7fb..ca95ded897403e6aa2a1e30d8528ce614b4bc177 100644 (file)
@@ -291,7 +291,6 @@ const methods = {
                                fd.close();
                        }
 
-                       result.odhcpd = false;
                        fd = popen('odhcpd -h 2>/dev/null');
 
                        if (fd) {
git clone https://git.99rst.org/PROJECT