luci-lua-runtime: fix legacy luci-mod-rpc authentication
authorJo-Philipp Wich <jo@mein.io>
Sat, 29 Apr 2023 22:19:35 +0000 (00:19 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sat, 29 Apr 2023 22:27:47 +0000 (00:27 +0200)
commit2a9c3a3173e0cec686fb8d9fafb8c063f80958e4
treeff92056bfe197f024b5d32219bcfe59c30bbc6b2
parent4f4ad9bff5482211695bf564543e4d34de4808d8
luci-lua-runtime: fix legacy luci-mod-rpc authentication

The legacy RPC module authentication fixup was improperly ported into the
Lua dispatcher stub module, rendering legacy RPC authentication broken.

Additionally, 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")
Fixes: ded8ccf93e ("luci-base-ucode: add initial ucode based LuCI runtime")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-lua-runtime/luasrc/dispatcher.lua