Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions patches/@steipete__sweet-cookie.patch
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,20 @@ index 71c815f77378d03e07061976ac372b3a55a61ac4..b21c15640955a8e7faa8f1d6ea6fed7c
args.profile = profile;
return resolveCookiesDbFromProfileOrRoots(args);
}
diff --git a/dist/providers/chromeSqlite/shared.js b/dist/providers/chromeSqlite/shared.js
index 1234567890abcdef..fedcba0987654321 100644
--- a/dist/providers/chromeSqlite/shared.js
+++ b/dist/providers/chromeSqlite/shared.js
@@ -185,9 +185,13 @@ async function readChromeRows(dbPath, where) {
const sqliteKind = isBunRuntime() ? 'bun' : 'node';
const sqliteLabel = sqliteKind === 'bun' ? 'bun:sqlite' : 'node:sqlite';
- const sql = `SELECT name, value, host_key, path, expires_utc, samesite, encrypted_value, ` +
+ // Cast expires_utc to TEXT to avoid integer overflow errors on Node < 24.4
+ // where readBigInts option is not available. The code already handles string parsing.
+ const expiresCol = (sqliteKind === 'node' && !supportsReadBigInts())
+ ? 'CAST(expires_utc AS TEXT) AS expires_utc'
+ : 'expires_utc';
+ const sql = `SELECT name, value, host_key, path, ${expiresCol}, samesite, encrypted_value, ` +
`is_secure AS is_secure, is_httponly AS is_httponly ` +
`FROM cookies WHERE (${where}) ORDER BY expires_utc DESC;`;
const result = await queryNodeOrBun({ kind: sqliteKind, dbPath, sql });
Loading