<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>230928</bug_id>
          
          <creation_ts>2021-09-28 18:13:57 -0700</creation_ts>
          <short_desc>WebExtension cookie storage expiration date is off by 30 years</short_desc>
          <delta_ts>2022-06-30 10:58:51 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>Other</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>macOS 11</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mikhail Labanov">maikudou</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>jberlin</cc>
    
    <cc>katherine_cheney</cc>
    
    <cc>maikudou</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1798129</commentid>
    <comment_count>0</comment_count>
    <who name="Mikhail Labanov">maikudou</who>
    <bug_when>2021-09-28 18:13:57 -0700</bug_when>
    <thetext>Steps to reproduce

1. Create a web extension for iOS 15
2. In context of WebExtension&apos;s background page set a cookie for a domain:
window.browser.cookies.set({
   name: &apos;mycookie&apos;,
   value: &apos;123&apos;,
   url: &quot;https://www.example.com&quot;,
   domain: &quot;.example.com&quot;,
   expirationDate: Date.now()/1000 + 60*60
})

Expected outcome:
A cookie &quot;mycookie&quot; 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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1798135</commentid>
    <comment_count>1</comment_count>
    <who name="Mikhail Labanov">maikudou</who>
    <bug_when>2021-09-28 18:43:15 -0700</bug_when>
    <thetext>The same is true for Desktop Safari WebExtension as well</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1799952</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-10-03 19:50:11 -0700</bug_when>
    <thetext>&lt;rdar://problem/83820804&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879444</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-06-30 10:58:51 -0700</bug_when>
    <thetext>The fix for this issue needs to be made outside of the WebKit project, therefore marking as &quot;RESOLVED | MOVED&quot;.

We believe this issue is fixed in:
iOS 16.0 Beta 1 (and newer)
macOS Ventura Beta 1 (and newer)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>