From 4d28c390ab181636b101a17203b2db3391784687 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 11 Oct 2021 19:01:39 +0200 Subject: [PATCH] luci-base: dispatcher: fix null access on dispatching unknown urls Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/dispatcher.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 {} -- 2.30.2