freifunk / openwrt-packages

Freifunk specific global OpenWrt Packages
Apache License 2.0
26 stars 33 forks source link

luci-mod-freifunk: calling via "Freifunk" button on page-bottom raises a lua-error #33

Open SvenRoederer opened 4 years ago

SvenRoederer commented 4 years ago

With recent LuCI (master branch; somewhere before https://github.com/openwrt/luci/commit/09a3b4730a769c43067ff1fb3e4aad339271fbc3) Luci throws an error when clicking on the "Freifunk" button. The button on the page-bottom, beside the "Administration" button.

/usr/lib/lua/luci/dispatcher.lua:1190: attempt to index local 'f' (a nil value) stack traceback: /usr/lib/lua/luci/dispatcher.lua:1190: in function 'createtree_json' /usr/lib/lua/luci/dispatcher.lua:703: in function 'menu_json' /usr/lib/lua/luci/dispatcher.lua:796: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:995: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:479: in function </usr/lib/lua/luci/dispatcher.lua:478>

Seen with 05760f09e294caee423613ab681ce10d48629a19. Calling http:///cgi-bin/luci/ works fine, calling http:///cgi-bin/luci/freifunk fails.

SvenRoederer commented 3 years ago

did a bit digging today ... found that removing the code which drops the privileges (https://github.com/freifunk/openwrt-packages/blob/47b9025041666454f94dc66208ea39e796d38f9b/modules/luci-mod-freifunk/luasrc/controller/freifunk/freifunk.lua#L21) makes to code run.

So it seems to be a permission problem ...