Skip to content

Harden submit-form session cookies#2945

Merged
donnchawp merged 2 commits into
trunkfrom
fix/submit-form-cookie-hardening
May 11, 2026
Merged

Harden submit-form session cookies#2945
donnchawp merged 2 commits into
trunkfrom
fix/submit-form-cookie-hardening

Conversation

@donnchawp
Copy link
Copy Markdown
Contributor

@donnchawp donnchawp commented May 11, 2026

Summary

Hardening for the cookie-based "resume an in-progress submission" flow on the frontend job submission form.

  • Strengthen the random token used for resuming a draft.
  • Set HttpOnly, SameSite=Lax, and Secure (under HTTPS) on the related cookies.
  • Apply matching attributes at the cookie-deletion sites so deletion still takes effect.

Details intentionally omitted; happy to discuss privately.

Test plan

  • Start a fresh guest submission; verify both Set-Cookie headers include HttpOnly and SameSite=Lax (and Secure over HTTPS).
  • Token cookie value is 32 alphanumerics and matches the _submitting_key post meta.
  • Closing the tab and revisiting the submission page still resumes the draft.
  • Visiting the submission page with ?new=1 clears both cookies from the browser.
  • Cross-origin POST to the submission endpoint does not carry the resume cookies (browser strips them due to SameSite=Lax); existing draft is not modified.

Plugin build for 6750502
📦 Download plugin zip
▶️ Open in playground

donnchawp added 2 commits May 11, 2026 11:38
Strengthen the token used for resuming an in-progress submission and
set HttpOnly, SameSite=Lax, and Secure (under HTTPS) on the related
cookies. Matching attributes are applied at the deletion sites so the
cookies are still cleared correctly.
@donnchawp donnchawp merged commit 4f2b4a1 into trunk May 11, 2026
35 checks passed
@donnchawp donnchawp deleted the fix/submit-form-cookie-hardening branch May 11, 2026 11:56
@donnchawp donnchawp added this to the 2.4.2 milestone May 11, 2026
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