OpenWPM icon indicating copy to clipboard operation
OpenWPM copied to clipboard

Expiry value of session cookies

Open shivani-1521 opened this issue 4 years ago • 2 comments

The expiry value of session cookies are being shown as "9999-12-31T21:59:59.000Z" in the javascript_cookies table of the output crawl-data.sqlite file. As session cookies may not be returning an expiration date, some other representation of the expiry would be more suitable.

shivani-1521 avatar Mar 26 '21 13:03 shivani-1521

This looks like a bug on our side. See: https://github.com/mozilla/OpenWPM/blob/cb95ecc05fb4618e4275faecbc62b84123ebf1b0/openwpm/Extension/webext-instrumentation/src/background/cookie-instrument.ts#L19. Session cookies probably never return an expiration date, so we treat it the same as maxint, which seems wrong.

englehardt avatar Mar 26 '21 13:03 englehardt

Another thing that weirds me out is that according to https://github.com/mozilla/OpenWPM/blob/cb95ecc05fb4618e4275faecbc62b84123ebf1b0/openwpm/Extension/webext-instrumentation/src/schema.ts#L149 this is supposed to be an optional DateTime and then we assign a string to it. (Aka why doesn't typescript complain here)

Why not just leave it empty, if we don't have a good value?

vringar avatar Mar 26 '21 14:03 vringar