Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luci-base: sysauth_https cookie isn't removed at logout #7269

Open
mikma opened this issue Sep 6, 2024 · 0 comments
Open

luci-base: sysauth_https cookie isn't removed at logout #7269

mikma opened this issue Sep 6, 2024 · 0 comments

Comments

@mikma
Copy link
Contributor

mikma commented Sep 6, 2024

Steps to reproduce:

  1. log in via https

  2. log out

  3. inspect page in browser

Actual behavior:

The /cgi-bin/luci/admin/logout response headers contains one set-cookie line which expires the sysauth_http cookie but not the sysauth_https cookie:
set-cookie: sysauth_http=; expires=Thu, 01 Jan 1970 01:00:00 GMT; path=/cgi-bin/luci/

Expected behavior:

The /cgi-bin/luci/admin/logout response headers should contain two set-cookie lines which expire both cookies, sysauth_http and sysauth_https (or maybe it's enough to expire the sysauth_https cookie when you use https.)

Additional Information:

OpenWrt version information from system /etc/openwrt_release

DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='23.05.3'
DISTRIB_REVISION='r23809-234f1a2efa'
DISTRIB_TARGET='x86/64'
DISTRIB_ARCH='x86_64'
DISTRIB_DESCRIPTION='OpenWrt 23.05.3 r23809-234f1a2efa'
DISTRIB_TAINTS=''

I have debugged the issue and apparently action_logout in modules/luci-base/ucode/controller/admin/index.uc first sets the set-cookie header to sysauth_https=... if https is enabled, and after that it always sets the set-cookie header to sysauth_http=... which overwrites the first set-cookie header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant