Skip to content

Reject Expires dates outside cookie year bounds - #290

Merged
blakeembrey merged 2 commits into
jshttp:masterfrom
offyotto:fix/expires-year-bounds
Nov 4, 2026
Merged

blakeembrey merged 2 commits into
jshttp:masterfrom
offyotto:fix/expires-year-bounds

Conversation

@offyotto

Copy link
Copy Markdown
Contributor

Validate UTC years 1601–9999 before serialization. Year 0049 currently round-trips as 2049; years above 9999 exceed the four-digit cookie-date grammar. Adds eight rejection cases and three valid-boundary controls. Verified: npm test (63,751 cases), TypeScript build/typecheck, 1.28 kB bundle. RFC 6265 §§4.1.1, 5.1.1.

@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4898ba2) to head (47bdf31).
⚠️ Report is 43 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #290   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          160       194   +34     
  Branches        69        83   +14     
=========================================
+ Hits           160       194   +34     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blakeembrey
blakeembrey merged commit ee150b5 into jshttp:master Nov 4, 2026
7 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.

2 participants