Page MenuHomePhabricator

Find alternative to Special:HideBanners cookies to mitigate the loss of 3rd-party cookie support
Open, Needs TriagePublic

Description

Safari is already blocking 3rd-party cookies, Chrome and Firefox have short-term plans to drop them. This means that all fundraising pages that are not hosted on a wikipedia.org or wikimedia.org domain (for example spenden.wikimedia.de) won't be able to request the Special:HideBanners page on their donation confirmation page.

This ticket is a placeholder to bring the matter to the attention of the CentralNotice devs. I have two ideas how the loss of 3rd-party cookies could be mitigated, but it needs much more thought and decision-making:

  • Add a "secure redirect" feature to "Special:HideBanners": The requesting fundraising site redirects the user to wikipedia, with a return URL. The redirect HTTP request from wikipedia contains a cookie. To avoid redirecting to malicious sites, we'd need some mechanism for whitelisting the allowed domains.
  • A yet-to-be-published new browser API that allows for cross-site logins

Event Timeline

• DStrine renamed this task from Find alternative to Special:HideBanners cookies to mitigate the loss of 3rd-party cookie support to investigate: Find alternative to Special:HideBanners cookies to mitigate the loss of 3rd-party cookie support.Feb 18 2020, 9:06 PM
• DStrine moved this task from Triage to Current Sprint on the Fundraising-Backlog board.

The exception for Safari - the 'Storage Access API' - only works for iframe with user interaction, for example clicking a 'like' button. So that won't work for us.

To hide Wikipedia fundraising banners on TY pages, the simplest solution would be to redirect users through Wikipedia and set a cookie there (the 'secure redirect' mentioned by @gabriel-wmde)

  • Donor returns to payments-wiki after payment
  • gets redirected to <lang>.wikipedia.org/wiki/Special:HideBanners?category=fundraising&redirect=https://donate.wikimedia.org/wiki/Thank_you/<lang>
  • HideBanners sets hide cookie for fundraising, checks that donate.wikimedia.org is in list of allowed redirects, sends user there
  • User sees thank you page.

TY pages will take a brief moment longer to load but banners will still be hidden in every browser.

The harder problem is hiding e.g. community banners across multiple projects. We could conceivably use a sort-lived user preference for hiding things for logged-in users, since those are the users most likely to be seeing community banners on multiple sites.

Thanks for managing this, @Ejegg. I'm also thinking about the monthly convert modal that we implemented as a "post-payment" option for one-time donors (right now only integrated for Ingenico).

When we realized the likelihood of some donors seeing the modal and just closing the browser tab, thereby preventing them from hitting the TY page and getting the typical hide cookie, we started setting the hide cookie when the modal pops up.

We're losing that option now too, right?

@spatton yes we will loose that option too. I think the best solution for now is a redirect. I'm sending an email on this.

correction. It is technically possible to add in redirects in the modal flows but this also increases friction in this flow.

• DStrine renamed this task from investigate: Find alternative to Special:HideBanners cookies to mitigate the loss of 3rd-party cookie support to EPIC: Find alternative to Special:HideBanners cookies to mitigate the loss of 3rd-party cookie support.May 4 2020, 4:16 PM
• DStrine added a project: Epic.
Arendpieter renamed this task from EPIC: Find alternative to Special:HideBanners cookies to mitigate the loss of 3rd-party cookie support to Find alternative to Special:HideBanners cookies to mitigate the loss of 3rd-party cookie support.Jan 30 2025, 12:03 AM
Arendpieter edited projects, added: SUL3; removed: Epic.

Change #1180165 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/CentralNotice@master] Set banner hide cookies to Secure / SameSite=None

https://gerrit.wikimedia.org/r/1180165

Change #1180165 merged by jenkins-bot:

[mediawiki/extensions/CentralNotice@master] Set banner hide cookies to Secure / SameSite=None

https://gerrit.wikimedia.org/r/1180165

Change #1186618 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/CentralNotice@master] Set banner hide cookies to Secure / SameSite=None

https://gerrit.wikimedia.org/r/1186618