From 65ef40623a223c440b51b6f8e1d24265e6cb4f61 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 30 Apr 2023 00:19:35 +0200 Subject: [PATCH] luci-lua-runtime: fix legacy luci-mod-rpc authentication The split of the former `sysauth` cookie into `sysauth_http` and `sysauth_https` ones was also imposed upon the RPC module, without leaving the option to use just `sysauth` in place, so allow this cookie name again for the legacy RPC logins. Fixes: #6333 Fixes: e1932592c3 ("luci-base: use different cookie names for HTTP and HTTPS") Signed-off-by: Jo-Philipp Wich (backported from commit 2a9c3a3173e0cec686fb8d9fafb8c063f80958e4) --- modules/luci-base/luasrc/dispatcher.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index b190f5302f..afd6d9b12e 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -348,7 +348,7 @@ local function tree_to_json(node, json) elseif subname == "rpc" and subnode.module == "luci.controller.rpc" then spec.auth = { login = false, - methods = { "query:auth", "cookie:sysauth_https", "cookie:sysauth_http" } + methods = { "query:auth", "cookie:sysauth_https", "cookie:sysauth_http", "cookie:sysauth" } } elseif subnode.module == "luci.controller.admin.uci" then spec.auth = { -- 2.30.2