Closed Bug 1578068 Opened 5 years ago Closed 2 years ago

SameSite=LaxByDefault breaks image upload on disqus

Categories

(Core :: Privacy: Anti-Tracking, defect, P3)

68 Branch
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox96 --- disabled

People

(Reporter: contact, Unassigned)

References

Details

(Whiteboard: [domsecurity-backlog1])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

set privacy.firstparty.isolate.restrict_opener_access;false, login to disqus on a page, for example an article on presstv.com... login, upload image fails.

Component: General → DOM: Security
Priority: -- → P3
Whiteboard: [domsecurity-backlog1]

This is also broken under both Dynamic FPI and the Level 2 ETP cookie blocking list.

I can reproduce the breakage on https://batman-news.com/2020/04/10/quarantine-book-club-batman-ego/ (the site in Comment 0 no longer appears to use Disqus).

I'm able to log in successfully, but see the error message "You must be logged in to upload an image." if I try to upload an image.

The upload attempt makes a request to: https://uploads.services.disqus.com/api/3.0/media/create.json?api_key=FOO, which returns 400. What's interesting is that we do have a storage access permission for disqus.com since it uses a pop-up for login. IIRC we use origin for these checks, so this permission doesn't match the uploads.services.disqus.com request.

Summary: First Party Isolation breaks image upload on disqus → FPI, DFPI, and Level 2 cookie blocking breaks image upload on disqus

(In reply to Steven Englehardt [:englehardt] from comment #1)

This is also broken under both Dynamic FPI and the Level 2 ETP cookie blocking list.

I can reproduce the breakage on https://batman-news.com/2020/04/10/quarantine-book-club-batman-ego/ (the site in Comment 0 no longer appears to use Disqus).

I'm able to log in successfully, but see the error message "You must be logged in to upload an image." if I try to upload an image.

The upload attempt makes a request to: https://uploads.services.disqus.com/api/3.0/media/create.json?api_key=FOO, which returns 400. What's interesting is that we do have a storage access permission for disqus.com since it uses a pop-up for login. IIRC we use origin for these checks, so this permission doesn't match the uploads.services.disqus.com request.

Yes, I can confirm that the requested permission type for uploading image is 3rdPartyStorage^https://uploads.services.disqus.com, but the granted permission type is 3rdPartyStorage^https://disqus.com.

Thanks Gary!

stpeter or mike: do we have contacts at Disqus that we could reach out to about this?

It seems like they may have two approaches to fixing this:

  1. Short-term: move the upload functionality under the Disqus origin. This alone isn't ideal though, because the disqus.com storage access relies on our temporary compatibility heuristic.
  2. Long-term: Use the Storage Access API.
Flags: needinfo?(stpeter)
Flags: needinfo?(miket)

Intro email sent.

Flags: needinfo?(stpeter)
Flags: needinfo?(miket)
Severity: normal → S3

I can confirm this is still broken.

I've confirmed that this is also broken in Safari and in Chrome incognito.

I've reached out to someone at Disqus through a mutual connection and will report back if this attempt is successful.

I can no longer reproduce this issue by using the link https://batman-news.com/2020/04/10/quarantine-book-club-batman-ego/

Johann, would you be able to confirm? Thanks.

Flags: needinfo?(jhofmann)

This seems to have been fixed on Disqus side, I can no longer reproduce it either. This is good!

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(jhofmann)
Resolution: --- → WORKSFORME

I managed to reproduce this issue on the Firefox nightly 94.0a1 (2021-09-29), "You must be logged in to upload an image." message received even after being logged in.
Please note that I managed to reproduce this issue on Chrome also.

Flags: needinfo?(jhofmann)

Can you try to flip network.cookie.sameSite.laxByDefault to false and try again in Nightly? This would explain why it breaks in Chrome as well.

Thanks!

Flags: needinfo?(jhofmann) → needinfo?(hani.yacoub)

Verified as fixed on Firefox Nightly 95.0a1 with both prefs "network.cookie.sameSite.laxByDefault" and "privacy.firstparty.isolate.restrict_opener_access" set to false.
Verified as fixed on Firefox Beta 94.0b2 and on Firefox 93.0 with cookiebehavior set to 5 and both prefs from above set to false.
All verifications were made on Windows 10 x64, macOS 10.15 and on Ubuntu 20.04.
Thanks.

Flags: needinfo?(hani.yacoub)

Thanks Hani! Reopening this as breakage for SameSite=Lax

Status: RESOLVED → REOPENED
Component: DOM: Security → Privacy: Anti-Tracking
Ever confirmed: true
Resolution: WORKSFORME → ---
Summary: FPI, DFPI, and Level 2 cookie blocking breaks image upload on disqus → SameSite=Lax breaks image upload on disqus

Should have opened a new bug for the SameSite breakage -- that's a completely different mechanism and would require different fixes (by the site and/or Mozilla) than one caused by dFPI/ETP.

Summary: SameSite=Lax breaks image upload on disqus → SameSite=LaxByDefault breaks image upload on disqus

I can upload an image just fine on blogs using Disqus. I tried the Batman News site linked here and jqueryscript.net

Given this was broken on Chrome as well, and our laxByDefault setting is supposed to match their behavior, it's quite likely Discus fixed it. When I check my disqus cookies now almost all of them are using an explicit SameSite=None. That's the explicit opt-out setting by sites to get the behavior before laxByDefault was turned on.

Status: REOPENED → RESOLVED
Closed: 3 years ago2 years ago
Resolution: --- → WORKSFORME

marking as disabled for fx96 since we set sameSite.laxByDefault and sameSite.noneRequiresSecure to false via a pref flip

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: