Repository navigation
feat: improve cookie import robustness and cross-platform support - #736
Merged
Merged
Conversation
Fix logged-out-after-import bugs and expand browser/platform coverage: - Copy WAL/SHM sidecars so fresh auth tokens aren't missed when the source browser is running - Probe Network/Cookies path (Chrome 96+) with legacy fallback - Discover multi-profile setups from Chrome's Local State JSON - Replace sqlite3 CLI shell-outs with node:sqlite DatabaseSync - Add Firefox support (plaintext SQLite, moz_cookies table) - Add Safari support (binary cookie parser, EPERM guidance for FDA) - Add Windows decryption (DPAPI master key + AES-256-GCM) - Add Linux decryption (GNOME secret-tool / peanuts fallback) - Platform-aware browser root paths (macOS/Windows/Linux) - Skip Google integrity cookies (SIDCC, AEC, __Secure-*PSIDCC) - Handle Chromium timestamps exceeding Number.MAX_SAFE_INTEGER
- Fix SameSite mapping: use chromiumSameSite() for Chromium DB, firefoxSameSite() for Firefox DB - Sanitize browserProfile IPC param to prevent path traversal - Strip cookiesPath/keychainService/keychainAccount from detectBrowsers response - Remove cookie value context from diag log to prevent data leakage - Fix replace() → replaceAll() for Linux keyring lookup - Handle non-Uint8Array encrypted_value gracefully - Clamp Safari binary cookie size to buf.length to prevent OOB reads - Stop leaking error internals to renderer in failure messages - Add Safari page bounds checks for pageCount and cookieCount - Fix readCString to accept valid offset 0
Jinwoo-H
force-pushed
the
Jinwoo-H/cookie-improve
branch
from
April 17, 2026 03:24
591469c to
98b3213
Compare
brennanb2025
added a commit
that referenced
this pull request
Aug 9, 2026
…port (STA-3514) Delete the import-time UA synthesis entirely instead of patching its version detection. The session now always keeps the engine-derived UA the registry sets at startup (clean or native), for imported and non-imported profiles alike. Why deletion is the fix: - The synthesis read CFBundleShortVersionString, which on forks is a marketing version — Arc imports presented Chrome/1.x and sites rejected the browser as ancient (STA-3514). - Its stated purpose (keep Google-bound cookies valid) is handled by isGoogleSourceBoundCookie excluding those cookies since #736, and #12884 measured that Google rejects re-transplants regardless of UA identity. - #12608 measured the synthesized Chrome-shaped UA reaching /v3/signin/rejected while the engine UA reached account lookup. Persisted userAgent/userAgentByPartition meta is no longer read; legacy keys drop off on the next meta write. The #12811 gate existed only to catch bad synthesized values, so it leaves with the synthesis.
4 tasks done
brennanb2025
added a commit
that referenced
this pull request
Aug 10, 2026
…port (STA-3514) (#12849) * fix(browser): stop impersonating the source browser's UA on cookie import (STA-3514) Delete the import-time UA synthesis entirely instead of patching its version detection. The session now always keeps the engine-derived UA the registry sets at startup (clean or native), for imported and non-imported profiles alike. Why deletion is the fix: - The synthesis read CFBundleShortVersionString, which on forks is a marketing version — Arc imports presented Chrome/1.x and sites rejected the browser as ancient (STA-3514). - Its stated purpose (keep Google-bound cookies valid) is handled by isGoogleSourceBoundCookie excluding those cookies since #736, and #12884 measured that Google rejects re-transplants regardless of UA identity. - #12608 measured the synthesized Chrome-shaped UA reaching /v3/signin/rejected while the engine UA reached account lookup. Persisted userAgent/userAgentByPartition meta is no longer read; legacy keys drop off on the next meta write. The #12811 gate existed only to catch bad synthesized values, so it leaves with the synthesis. * test(browser): catch source UA impersonation regression
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…port (STA-3514) (stablyai#12849) * fix(browser): stop impersonating the source browser's UA on cookie import (STA-3514) Delete the import-time UA synthesis entirely instead of patching its version detection. The session now always keeps the engine-derived UA the registry sets at startup (clean or native), for imported and non-imported profiles alike. Why deletion is the fix: - The synthesis read CFBundleShortVersionString, which on forks is a marketing version — Arc imports presented Chrome/1.x and sites rejected the browser as ancient (STA-3514). - Its stated purpose (keep Google-bound cookies valid) is handled by isGoogleSourceBoundCookie excluding those cookies since stablyai#736, and stablyai#12884 measured that Google rejects re-transplants regardless of UA identity. - stablyai#12608 measured the synthesized Chrome-shaped UA reaching /v3/signin/rejected while the engine UA reached account lookup. Persisted userAgent/userAgentByPartition meta is no longer read; legacy keys drop off on the next meta write. The stablyai#12811 gate existed only to catch bad synthesized values, so it leaves with the synthesis. * test(browser): catch source UA impersonation regression
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Network/Cookiespath (Chrome 96+), discover multi-profile setups fromLocal StateJSONsqlite3binarymoz_cookiestable; Safari parsesCookies.binarycookiesbinary format with clear EPERM guidance for Full Disk Accesssecret-toolwithpeanutsfallback for v10 cookies__Secure-*PSIDCC) that cause CookieMismatch when imported into a different browserexpires_utcvalues exceedNumber.MAX_SAFE_INTEGER; source DB opened withreadBigInts: trueTest plan