<?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>214608</bug_id>
          
          <creation_ts>2020-07-21 11:53:49 -0700</creation_ts>
          <short_desc>Cookie with SameSite=None not created in an iframe on Catalina but works fine in Mojave</short_desc>
          <delta_ts>2020-07-21 18:42:27 -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>New Bugs</component>
          <version>Safari 13</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.15</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tsvetan Stoychev">tstoyche</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>sihui_liu</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1673546</commentid>
    <comment_count>0</comment_count>
    <who name="Tsvetan Stoychev">tstoyche</who>
    <bug_when>2020-07-21 11:53:49 -0700</bug_when>
    <thetext>I am not sure if this is a real bug or it&apos;s just not clear from Safari release notes what should be the expected behavior when we have enabled &quot;Prevent cross-site tracking&quot; in Safari privacy settings.

Reference to release notes: https://developer.apple.com/documentation/safari-release-notes/safari-13_1-release_notes

&quot;Added cookie blocking for all cross-site resources by default.&quot;


Demo:

This website here is used for demonstration if a cookie with a flag SameSite=None is created in iframe on 3rd party context: https://animated-caribou.glitch.me 


SiteB is a website loaded in an iframe and it demonstrates what cookies are created inside.

I see different behavior on Catalina and Mojave:

=== Mojave ===

OS version: 10.14.6
Safari version: 13.1.1 (14609.2.9.1.3)
&quot;Prevent cross-site tracking&quot;: Enabled
User Agent String: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15

Result SiteB:

1. document.cookie: foo=SiteBCookie; foo2=SiteBNone
2. Cookie on Server: {&quot;foo&quot;:&quot;SiteBCookie&quot;,&quot;foo2&quot;:&quot;SiteBNone&quot;}


=== Catalina ===

OS version: 10.15.4
Safari version: Version 13.1 (15609.1.20.111.8)
&quot;Prevent cross-site tracking&quot;: Enabled
User Agent String: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15

Result SiteB:

1. document.cookie: 
2. Cookie on Server: {}



Question:

The question is why cookies are not created on Catalina and is this a bug or did Safari decide to block all cookies in such context even if the spec for None says: &quot;Cookies will be sent in all contexts, i.e sending cross-origin is allowed.&quot;. Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1673716</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-07-21 18:42:27 -0700</bug_when>
    <thetext>&lt;rdar://problem/65914276&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>