Skip to content

fix: set HttpOnly on the JWT removal cookie in Reset - #320

Merged
umputun merged 1 commit into
masterfrom
reset-httponly-expiry
Oct 11, 2026
Merged

umputun merged 1 commit into
masterfrom
reset-httponly-expiry

Conversation

@umputun

@umputun umputun commented Oct 11, 2026

Copy link
Copy Markdown
Member

Reset now expires the JWT cookie with HttpOnly, same as Set writes it, in both modules.

Chromium rejects any Set-Cookie for a __Http- or __Host-Http- prefixed name without HttpOnly, the expiry included. With such a JWTCookieName logout left the session cookie in place. With PartitionedCookies on, the unpartitioned form was cleared by the legacy expiry and the partitioned one survived.

the removal header gains ; HttpOnly for every deployment. Cookie identity is name, domain and path, so it still replaces the cookie, and TestJWT_Reset pins the new header.

found while reviewing #318.

Set writes the JWT cookie with HttpOnly and Reset expired it without.
Chromium rejects any Set-Cookie for a __Http- or __Host-Http- prefixed
name that lacks HttpOnly, the expiry included, so with such a
JWTCookieName logout left the session cookie in place. With
PartitionedCookies on, the unpartitioned form was cleared and the
partitioned one survived.

the removal header gains "; HttpOnly" for every deployment. Cookie
identity is name, domain and path, so it still replaces the cookie.
Copilot AI balanced review requested due to automatic review settings October 11, 2026 17:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coveralls

coveralls commented Oct 11, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 38161668714

Coverage increased (+0.004%) to 86.88%

Details

  • Coverage increased (+0.004%) from the base build.
  • Patch coverage: 2 of 2 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3849
Covered Lines: 3344
Line Coverage: 86.88%
Coverage Strength: 9.95 hits per line

💛 - Coveralls

@umputun
umputun merged commit f07b327 into master Oct 11, 2026
9 checks passed
@umputun
umputun deleted the reset-httponly-expiry branch October 11, 2026 17:58
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

Successfully merging this pull request may close these issues.

3 participants