WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
196852
Unchecked "Prevent cross-site tracking" option behaves incorrectly
https://bugs.webkit.org/show_bug.cgi?id=196852
Summary
Unchecked "Prevent cross-site tracking" option behaves incorrectly
Remko Tronçon
Reported
2019-04-11 23:30:11 PDT
The "Prevent cross-site tracking" option in Safari is either misnamed, or behaves incorrectly when unchecked. When unchecked, all storage API requests are rejected automatically, so cross-site iframes stop working altogether. I was expecting the storage API to always grant storage access with this option unchecked.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-04-12 10:34:10 PDT
<
rdar://problem/49855574
>
John Wilander
Comment 2
2019-04-12 10:45:28 PDT
Thanks for your bug report. We've received at least one similar report before. I agree it should be flipped.
John Wilander
Comment 3
2019-04-12 10:46:59 PDT
This said, the third-party resource can always try to set a cookie and read it back to check its status.
Remko Tronçon
Comment 4
2019-04-12 11:31:45 PDT
Thanks! Not sure I understand yet how reading back the cookie can help. You can't do it pre-storage-access-request, since cookies aren't guaranteed to work yet (if the 3rd party is classified as tracker); and it's not supposed to work in the reject handler either (which is where the unchecked option takes you), since cookies won't work anyway for potentially other reasons (the user explicitly denying access, missing first party interaction, ...)? I haven't tested what happens if the 3rd party isn't classified as a tracker, but we already do the cookie-write-read check in that case to detect the old WebKit behavior where cookies don't work if the site hasn't been opened (and used cookies) as first party yet.
John Wilander
Comment 5
2019-04-12 12:20:35 PDT
(In reply to r+webkit from
comment #4
)
> Thanks! > > Not sure I understand yet how reading back the cookie can help. You can't do > it pre-storage-access-request, since cookies aren't guaranteed to work yet > (if the 3rd party is classified as tracker); and it's not supposed to work > in the reject handler either (which is where the unchecked option takes > you), since cookies won't work anyway for potentially other reasons (the > user explicitly denying access, missing first party interaction, ...)? > > I haven't tested what happens if the 3rd party isn't classified as a > tracker, but we already do the cookie-write-read check in that case to > detect the old WebKit behavior where cookies don't work if the site hasn't > been opened (and used cookies) as first party yet.
If ITP is turned off, you can always set cookies. Thus, the third-party who calls hasStorageAccess() can also try to read cookies. If they're available, there's no need for calling the Storage Access API. If they're not, the third-party can try to write a cookie and read it back. If it works, either ITP is turned off or the third-party has not been classified but ITP and has existing cookies that are not exposed in document.cookie, for instance HttpOnly cookies. The reason I mention cookies not exposed in document.cookie is Safari's 10+ year old cookie policy where a domain has to set its initial cookie(s) as first-party. Otherwise it cannot use cookies as third-party, regardless of calls to the Storage Access API.
Remko Tronçon
Comment 6
2019-04-12 12:55:37 PDT
Ah, I didn't realize it was just the access API that was rejecting requests, but that storage was still working. Your workaround looks good, thanks!
Ahmad Saleem
Comment 7
2024-03-10 19:49:44 PDT
@Alexey - if it is something need to change on Safari UI level, should we mark this as "RESOLVED MOVED"? Safari > Settings > Privacy Website tracking: Prevent cross-site tracking ____ Appreciate if you can share your input.
Alexey Proskuryakov
Comment 8
2024-03-11 09:20:34 PDT
John would be a better person to answer this. It seems like we are tracking this as a WebKit issue at this point.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug