mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-08-15 23:50:19 +02:00
feat: Add support for sameSite field (#628)
Recent browsers (and HTTP) added "sameSite" setting to limit cross site attacks. Add support for exporting this property from Firefox and Chrome and to export to csv and cookie-editor format. Also extract new "session" and "hostOnly" properties for cookie-editor format. Tested on Firefox, Chrome and Chromium. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
@@ -106,14 +106,14 @@ func TestWrite_CSV_Cookie(t *testing.T) {
|
||||
assert.Equal(t,
|
||||
[]string{
|
||||
"browser", "profile", "host", "path", "name", "value",
|
||||
"is_secure", "is_http_only", "has_expire", "is_persistent", "expire_at", "created_at",
|
||||
"is_secure", "is_http_only", "has_expire", "is_persistent", "expire_at", "created_at", "same_site",
|
||||
},
|
||||
records[0],
|
||||
)
|
||||
assert.Equal(t,
|
||||
[]string{
|
||||
"Chrome", "Default", ".example.com", "/", "session", "abc123",
|
||||
"true", "true", "true", "true", "2026-01-15T10:30:00Z", "2026-01-15T10:30:00Z",
|
||||
"true", "true", "true", "true", "2026-01-15T10:30:00Z", "2026-01-15T10:30:00Z", "",
|
||||
},
|
||||
records[1],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user