Bug 230928

Summary: WebExtension cookie storage expiration date is off by 30 years
Product: WebKit Reporter: Mikhail Labanov <maikudou>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Critical CC: bfulgham, jberlin, katherine_cheney, maikudou, timothy, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: iPhone / iPad   
OS: macOS 11   

Mikhail Labanov
Reported Wednesday, September 29, 2021 2:13:57 AM UTC
Steps to reproduce 1. Create a web extension for iOS 15 2. In context of WebExtension's background page set a cookie for a domain: window.browser.cookies.set({ name: 'mycookie', value: '123', url: "https://www.example.com", domain: ".example.com", expirationDate: Date.now()/1000 + 60*60 }) Expected outcome: A cookie "mycookie" is set with expiration date of now + 1 hour for the example.com domain Real outcome: A cookie with expiration date exactly 30 years in the future + 1 hour is created (year 2052 as at the time of this bug is filed)
Attachments
Mikhail Labanov
Comment 1 Wednesday, September 29, 2021 2:43:15 AM UTC
The same is true for Desktop Safari WebExtension as well
Radar WebKit Bug Importer
Comment 2 Monday, October 4, 2021 3:50:11 AM UTC
Brent Fulgham
Comment 3 Thursday, June 30, 2022 6:58:51 PM UTC
The fix for this issue needs to be made outside of the WebKit project, therefore marking as "RESOLVED | MOVED". We believe this issue is fixed in: iOS 16.0 Beta 1 (and newer) macOS Ventura Beta 1 (and newer)
Note You need to log in before you can comment on or make changes to this bug.