commit 314884daafd9ef33b912e426048c91c14fd52993cbb5aa478ecb4d05fa7327fb from: Stefan Sperling date: Mon Feb 9 15:06:18 2026 UTC scope gotwebd authentication cookies to our URL root path Prevents the auth cookie from being sent to pages on the same domain which aren't served by gotwebd. Spotted by + ok op@ commit - ef7c838a181873a1e0182e59e4c5f7bf9f6beed25c8c875263913dfd119b26c9 commit + 314884daafd9ef33b912e426048c91c14fd52993cbb5aa478ecb4d05fa7327fb blob - 2a6c64d64a2a499a9e9c042de92c6cf6fe54854ef31799569bec1d14d9eb528a blob + 55c2f211d82888bfb9fd4584245fbd84a5c19cf16e47d20e74e9fbd8562b022c --- gotwebd/auth.c +++ gotwebd/auth.c @@ -388,9 +388,9 @@ logged_in: } r = tp_writef(c->tp, "Set-Cookie: gwdauth=%s;" - " SameSite=Strict;%s Path=/; HttpOnly; Max-Age=%llu\r\n", token, + " SameSite=Strict;%s Path=%s; HttpOnly; Max-Age=%llu\r\n", token, env->auth_config == GOTWEBD_AUTH_SECURE ? " Secure;" : "", - validity); + env->gotweb_url_root, validity); explicit_bzero(token, strlen(token)); free(token); if (r == -1) {