luci/modules/luci-base/luasrc
Jo-Philipp Wich e1932592c3 luci-base: use different cookie names for HTTP and HTTPS
Since HTTP cookies may not overwrite HTTPS ("secure") ones, users are
frequently unable to log into LuCI when a stale, "secure" `sysauth` cookie
is still present in the browser as it commonly happens after e.g. a
sysupgrade operation or when frequently jumping between HTTP and HTTPS
access.

Rework the dispatcher to set either a `sysauth_http` or `sysauth_https`
cookie, depending on the HTTPS state of the server connection and accept
both cookie names when verifying the session ID.

This allows users to log into a HTTP-only LuCI instance while a stale,
"secure" HTTPS cookie is still present.

Requires commit 2b0539ef9d ("lucihttp: update to latest Git HEAD") to
function properly.

Fixes: #5843
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-07-08 15:38:53 +02:00
..
controller/admin luci-base: use different cookie names for HTTP and HTTPS 2022-07-08 15:38:53 +02:00
model luci-base: set the fallback default of rollback timeout to 90s 2020-10-21 18:47:38 +03:00
sgi treewide: removed trailing whitespaces and extra newlines in 'modules' 2021-01-20 17:48:16 +02:00
sys timezone data: update to 2022a 2022-03-24 21:09:41 +02:00
view luci-base: sysauth.htm: switch https detection URL 2021-10-11 20:37:36 +02:00
cacheloader.lua treewide: minor fixes to typos, whitespace, and indentation 2021-01-20 12:36:13 +02:00
ccache.lua treewide: removed trailing whitespaces and extra newlines in 'modules' 2021-01-20 17:48:16 +02:00
config.lua Globally reduce copyright headers 2015-01-16 23:38:38 +01:00
dispatcher.lua luci-base: use different cookie names for HTTP and HTTPS 2022-07-08 15:38:53 +02:00
dispatcher.luadoc luci-base: dispatcher: remove tree modifier support 2018-11-27 14:46:55 +01:00
i18n.lua luci-base: remove unused i18n functions 2018-11-05 11:01:45 +01:00
i18n.luadoc luci-base: remove unused i18n functions 2018-11-05 11:01:45 +01:00
store.lua treewide: minor fixes to typos, whitespace, and indentation 2021-01-20 12:36:13 +02:00
sys.lua luci-base: sys.lua: fix parsing conntrack entries without timeout 2022-04-29 12:18:17 +02:00
sys.luadoc luci-base: remove references to removed functions from documentation 2021-03-01 09:17:04 +01:00
template.lua treewide: removed trailing whitespaces and extra newlines in 'modules' 2021-01-20 17:48:16 +02:00
version.lua Globally reduce copyright headers 2015-01-16 23:38:38 +01:00
xml.lua luci-base(-libs): move pcdata() and striptags() from util- to xml-class 2020-07-19 20:14:35 +02:00
xml.luadoc luci-base(-libs): move pcdata() and striptags() from util- to xml-class 2020-07-19 20:14:35 +02:00