Skip to content

Retain authentication cookies within handoff size limits - #31

Merged
Linuxuser67 merged 2 commits into
mainfrom
fix/audit-cookie-payload
Oct 20, 2026
Merged

Linuxuser67 merged 2 commits into
mainfrom
fix/audit-cookie-payload

Conversation

@Linuxuser67

@Linuxuser67 Linuxuser67 commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fix cookie selection and payload sizing for authenticated extension handoffs. Companion Grab-side fixes: Grab #499.

  • Prioritize cf_clearance, __Host-, __Secure-, and other authentication/session cookies when applying Grab's 100-cookie limit.
  • If the serialized JSON body exceeds the 30 KiB target, remove lower-priority cookies first and prefer dropping the largest serialized cookies within each priority.
  • Preserve the URL and user agent and retain critical authentication cookies whenever they fit. The pairing HMAC is still computed over the final serialized body.
  • Replace the regression test that expected all cookies to be dropped with coverage for cookie-count prioritization, oversized jars, retained authentication cookies, payload size, and the final body signature.

Validation

  • The extension's CI check workflow passed on the current PR head, including the revised payload-limit tests.

@Linuxuser67
Linuxuser67 merged commit 51eb7d4 into main Oct 20, 2026
2 checks passed
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.

1 participant