Skip to content

chore(deps): migrate to github.com/moond4rk/binarycookies/v2 - #708

Merged
moonD4rk merged 2 commits into
mainfrom
chore/binarycookies-v2
Nov 20, 2026
Merged

moonD4rk merged 2 commits into
mainfrom
chore/binarycookies-v2

Conversation

@moonD4rk

@moonD4rk moonD4rk commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #709.

Moves Safari cookie extraction to github.com/moond4rk/binarycookies/v2 at v2.0.0.

  • v2 fixes decoding bugs that hit real jars: a single cookie record over 4096 bytes made v1 reject the whole file, offsets were ignored, and flag values other than 0/1/4/5 lost their Secure/HttpOnly bits.
  • Cookie fields are now strings and times are already UTC, so extract_cookie.go drops the string(...) and .UTC() conversions.
  • HasExpire becomes meaningful: v2 returns the zero time for an invalid timestamp, which v1 never did.
  • browsertest builds the Safari cookie fixtures with binarycookies.Encode instead of a hand-written encoder (about 80 lines removed).

Release: https://github.com/moonD4rk/binarycookies/releases/tag/v2.0.0

Checklist

  • Pull request targets the main branch
  • All CI checks pass (lint, test, build)
  • I have added tests that prove my fix is effective or that my feature works (covered by the existing Safari tests, whose fixtures are now written by binarycookies.Encode)
  • I have added necessary documentation (if appropriate)
  • go.mod directive remains go 1.20 (do not bump)

v2 decodes jars that v1 rejected whole (any cookie record over 4096 bytes)
and returns strings and UTC times, so extraction drops its conversions;
Safari test fixtures are now written by binarycookies.Encode.
Copilot AI balanced review requested due to automatic review settings November 20, 2026 09:18

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 insufficient remaining quota. Try requesting a review at a lower effort level.

binarycookies.Encode writes whole seconds, so the 750ms fixture offset never reached the jar.
@moonD4rk
moonD4rk merged commit 9bd9426 into main Nov 20, 2026
9 checks passed
@moonD4rk
moonD4rk deleted the chore/binarycookies-v2 branch November 20, 2026 10:01
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.

Safari cookies always export is_secure/is_http_only as false

2 participants