browserutils / kooky

Go code to read cookies from browser cookie stores.
MIT License
210 stars 41 forks source link

firefox ReadCookies: length of record value can be 15 #37

Closed roberChen closed 3 years ago

roberChen commented 3 years ago

The table of firefox cookies has 15 elements, here is the CREATE statements of moz_cookies:

CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, 
originAttributes TEXT NOT NULL DEFAULT '', 
name TEXT, 
value TEXT, 
host TEXT, 
path TEXT, 
expiry INTEGER, 
lastAccessed INTEGER, 
creationTime INTEGER, 
isSecure INTEGER, 
isHttpOnly INTEGER, 
inBrowserElement INTEGER DEFAULT 0, 
sameSite INTEGER DEFAULT 0, 
rawSameSite INTEGER DEFAULT 0, 
schemeMap INTEGER DEFAULT 0, 
CONSTRAINT moz_uniqueid UNIQUE (name, host, path, originAttributes));

firefox version:

Version 82.0.2 (64-bit)

so the code below should be modified: https://github.com/zellyn/kooky/blob/808dae4f4a60b391c2f5ef187b09dfe8391a1cb8/internal/firefox/firefox.go#L59-L61

srlehn commented 3 years ago

40 should have fixed this.

can you please test?