summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-10-11 19:01:39 +0200
committerJo-Philipp Wich <jo@mein.io>2021-10-11 19:02:18 +0200
commit4d28c390ab181636b101a17203b2db3391784687 (patch)
treedb74daa35942d264607c56c4d5f5147ddc56c389
parent34b682afac310859f0d4696110d8a1af60f16c04 (diff)
luci-base: dispatcher: fix null access on dispatching unknown urls
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--modules/luci-base/luasrc/dispatcher.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua
index 2f965b16a8..bd1b112f60 100644
--- a/modules/luci-base/luasrc/dispatcher.lua
+++ b/modules/luci-base/luasrc/dispatcher.lua
@@ -918,7 +918,9 @@ function dispatch(request)
return
end
- page.readonly = not perm
+ if page then
+ page.readonly = not perm
+ end
end
local action = (page and type(page.action) == "table") and page.action or {}