Changes to SameSite Cookie Behavior – A Call to Action for Web Developers
hacks.mozilla.org
hacks.mozilla.org
They have no email address to report problems, the live chat agent wasn't technical enough to understand the issue (and blamed me) and GDS put their hands up and said it was nothing to do with them.
https://github.com/webcompat/web-bugs/issues/56216
I have no faith this'll get fixed on many sites before it breaks a much wider proportion of users' workflows.
> I have a technical message for the person or team responsible for building the XYZ website. Please ensure the following message gets delivered to them. Not acting on this message could cause the website to stop working entirely.
> [Technical details]
I'm asking because support agents sometimes receive messages from people who offer consulting services, often related to website security. Some of them are automated or not useful, but to a layperson they look similar to your template above.
I could imagine a scenario where a support agent dismisses the above message as spam.
Such training will likely be stepped up, making this sort of message more likely to be ignored, after the events at Twitter and Garmin recently which both seem to have stemmed from the phishing variety of "human factors" engineering on the part of the attackers.
Chrome can get away with breaking the web because most people wouldn’t even think to switch to Firefox or IE at this point.
Why wouldn't people switch to FF anymore? I'd say because they prioritize their product development in the wrong way. It's really sad. Competition would be helpful for the market.
It works perfectly fine and if anything I more frequently encounter compatibility issues with iOS Safari.
But there are so many people who have a Chrome-only attitude that I don’t see firefox’s market share going anywhere but down in the next decade.
In fact, it's just sad. I would really love to make the switch to support Mozilla as an alternative to the Google Ads monopoly. But not at the expense of giving up basic features that I have gotten used to. Maybe I'll try again once Google has managed to completely screw up on uBlock Origin and other beloved filter extensions.
Stuff like this is largely a matter of habit. You're used to chrome's details - so they make sense. But examples the other way around exist too - e.g. I'd find it hard to miss the picture-in-picture feature from FF when watching youtube in chrome. 'course, there's an extension for that too ;-).
And btw. thanks for the media keys recommendation. From the extension's description page, literally the first thing that comes up when you look at it:
1. The browser window must be active for media keys to be detected due to a Firefox limitation.
2. Only Play/Pause is supported due to a Firefox bug.
3. Pinned tabs get priority over all other tabs when pressing a media key.
4. macOS is not supported due to Firefox bug.
It's literally mentioning three FF bugs preventing you from building something useful with it on its front page. Meanwhile, that feature should have been something that doesn't require an extension on any supported platform in the first place.
None of these bugs/limitations are present in any Webkit/Chromium based browser I tested so far on macOS.
I won't even get into other unrelated "curiosities" here, like the order of DOM mutation events being wrong when debugging, but correct when the debugger is not attached in FF.
As to a feature being something that should not have required an extension in the first place - I don't agree with this. It's not just that the feature may or may not be attractive to a small slice of users, it's that we're quibbling not over the functionality, but over how it's delivered. Not every project needs to increase its scope to cover every possible use-case, even if they're valuable; that's kind of the point of add-ons.
As to mutation events - https://caniuse.com/#feat=mutation-events that's deprecated, so not exactly surprising to see a stagnant debugging support. Or perhaps you meant its replacement https://caniuse.com/#feat=mutationobserver? Is this an issue of insufficient backwards compatibility (event's replacing observers are around 8 years old), or an issue in the newer api?
In any case; I'm not begrudging you personal bad experience with FF - it's your experience after all. But as you say, it's a shame there isn't more competition and diversity; so I'm curious as to what the root cause is for it's lack of competitiveness.
I was talking about MutationObserver. I didn't have the urge to self-injure even more, so I didn't dive deeper into why FF is buggy there as well. I accepted it and moved on. By now, I am sure you will be able to find a way of arguing for FF regardless how buggy it is, so peace out bro – let's not spin this further :)
Just one last opinion: As to the root cause for its lack of competitiveness: My opinion is, as you may have guessed, that FF's codebase is pretty rotten and their product ownership is incapable of prioritizing correctly, both tactically and strategically. But of course, I won't be able to prove that. And you won't be able to disprove it. So let's leave it there.
FF's global desktop market share is at 8.6% [1] as we speak. Safari (macOS) is about to overtake it. When looking at global browser market share overall, it's at about 4.2% [2]. Safari has now double the market share of FF.
[1] https://gs.statcounter.com/browser-market-share/desktop/worl...
We can blame chrome and safari all we like, but the real blame is on web devs who had 1-2 years to fix this and just can't bother (until forced by Google or Apple).
Edit: I generally address this by contacting the site admins, showing them screen dumps of their broken site and say they should demand their web devs fix this for free since their design goes against industry best practices (I often include link to Mozilla article on this).
If that doesn't help, I try again with the higher ups, telling them their store have silently been rejecting paying customers and their IT people have refused to fix it. This usually fixes the issue quickly, only to come back after the next major site update.
Nothing is tangible to anyone until something is broken.
It's caused two major outages for us. Rather insidious as well since Chrome does A/B testing and gradually was rolling this change out.
> I generally address this by contacting the site admins, showing them screen dumps of their broken site and say they should demand their web devs fix this for free since their design goes against industry best practices
That's just not how the world works. Sites today are a mish mash of different application engines, SAAS providers, libraries and frameworks. If the version I built on two years ago doesn't set the Same-Site property that's not my (or the vendor's) fault. They gotta pay me to upgrade to fix it. And that's hoping that everything I depend on has upgraded their stuff to fix it.
But I think this can be an argument to switch browsers. Common users might not have the technical insight, but are certainly not keen on being tracked.
Firefox has become the only real cross-platform and non-Google-controlled alternative to Chrome/Chromium. It needs as much marketshare as possible in order to stay relevant and prevent Google from completely dominating the web.
Since a couple of versions ago, the history dropdown in the URL bar (but not the URL bar itself) has been hiding the "https://", at least for me. Which is incredibly annoying when you're used to "not having a https:// prefix" implying "use http:// as the prefix", since it makes it look like every site in the history dropdown is insecure. And it's inconsistent with the URL bar itself: type "example.org" on the URL bar, and not only will it go to http://example.org, but also it will hide the http://.
it seems the android situation is not much different. Yes, you can install something else, but people won't.
It's Windows+IE all over again.
Why? For one, Chrome has much higher marketshare than Safari on mobile. While Apple has a huge marketshare in terms of revenue, Android devices are much more popular than iOS/iPadOS devices in terms of sheer numbers, and these devices predominantly run Chrome.
As such, Chrome dominates both the mobile and desktop browser market, and the only way for the consumer to work against that is, simply put, to run Firefox/Gecko on his computer and his (Android) phone, or if you’re basically anti-Google like me, WebKit on your iPhone.
Just to point out one of the many such complaints https://youtu.be/ELCq63652ig
This is a classic case of chasing after the ideal solution and ending up nowhere instead of making a compromise and actually improving things. It would be far better for everyone if Mozilla used the Chromium engine and built features on top of that like Microsoft is doing. Instead they are putting massive amounts of effort into a rendering/js engine that will always be "broken" because it's not exactly the same as Chrome.
> It would be far better for everyone if Mozilla used the Chromium engine
No. Please no. That puts web standards in even more danger then they are now.
Since things move fast these days(See TikTok) I think its a better strategy to just speed up Google's goal of turning the Internet into an exploitative cess pit.
Their main goal is to increase sewage flow and ensure all flows move through their useless cloud and devices. Every time a cell divides, if DNA has to be read from Google through Google that would be optimal. Its all great and visionary, but with those increasing flows the stink of their creation constantly rises.
The more it stinks the more people can't ignore it.
So lets speed it up. Mozilla get out of the way guys. They will just use you guys, as they have, to signal their generosity or openness to learning or whatever bullshit. Why allow that?
Everyone likes to focus on how fast things can scale UP.
But they can collapse fast too. We need tools to do both.
So if Google and Facebook and Twitter want to scale up and give us 20 Trumps and Brexits this year and 200 next year and 2000 the year after, how can we help them do it faster? Thats the only way change will happen.
If that's not interesting to Mozilla, its could just sell Firefox to Samsung or whoever and go off and do something totally different as the Whatsapp, Signal guys did.
The problem is, that many big ones including government and also in consequence smaller fish wont quit the Googlenet, but for the sake of short term profit will stay in it, no matter how much it stinks. (Oh, you got no Google shopping card? How are we going to check your identity then? No, we cannot deal with you here, we are sorry!) This might make it very difficult for people to get official service without involving big corp.
There’s any number of circumstances in which my development machines don’t have HTTPS.
It's worth noting that as well as 3rd party tracking cookies - this has impacts for things like SAML Browser Post Profile.
Like, go ahead and try iframing linkedin.com, with x-f-o and CSP nuked it'll work on Firefox today but not Chrome. Even trying to intercept the cookie doesn't work.
I wish there were a way to just easily turn this stuff off so I could manipulate my user agent more easily.
I'm curious too - what's the use case for this? Why would you want to iframe linkedin?
It's possible there's some addon api to work around this, otherwise you'll need to use a proxy - which isn't too hard, really. Essentially: you need to have admin level control over the browser to allow this, or some other proxy; the browser won't allow a random website to see another site's cookies, even indirectly - which is by design.
So in your case: since this is a feature, not a bug - a trivial workaround looks unlikely.
For example, in this case (Firefox), to turn this new behaviour on ahead of time, the article says you can go to about:config and set network.cookie.sameSite.laxByDefault and network.cookie.sameSite.noneRequiresSecure . I'm sort of hoping/assuming that after this becomes the default, you'll still be able to override it using those exact about.config properties.
chrome://flags/#same-site-by-default-cookies
chrome://flags/#cookies-without-same-site-must-be-secure
I found that at least the #same-site-by-default-cookies flag behaved as I would expect when setting it to "Disabled". Use case was to load an iframe that sets it's own cookies with no SameSite value and still have that value default to "None".
We fixed this issue properly ("SameSite=None; Secure" in the cookie set in the iframe), but using the #same-site-by-default-cookies flag was a workaround for a little while.
What was a bit strange was the default behavior on Chrome was different for users even on the same Chrome version. They seemed to be rolling it out in phases. More info on that here: https://www.chromium.org/updates/same-site
Ah well, I guess I take the L on this.
They’re not good tags, if you want a link then make a link.
-edit-
This is how we use it:
We have two domains.
Our main site `widget.com` and `widgetusercontent.com`.
`widget.com` contains an iframe from `widgetusercontent.com`.
We have a service that runs on `widgetusercontent.com/service` that is controlled by us, but it needs to be authenticated with a temporary credential (doesn't matter if it gets leaked) and cannot run on the same domain as `widget.com` since it also contains user generated content.
We used to embed the URL `widgetusercontent.com/service?auth=$AUTH_COOKIE` on `widget.com` and have the `widgetusercontent.com/service` set the cookie, but this no longer works because this is third party cookie and has never worked on Safari.
The solution is to load `widgetusercontent.com/service` as a blank page containing only a service worker. We ask this page to load `widgetusercontent.com/service/sw.js?auth=$AUTH_COOKIE`. The service we control returns a service worker with the auth cookie embedded in it, and is set to rewrite every request under `widgetusercontent.com/service/*` and inject the $AUTH_COOKIE into the request header.
I came up with this myself but I assume others would have as well.
I don't know if this'll work for tracking and other nefarious stuff ad networks use but this is a legitimate use case for us.
Yes it works in Safari. Cookies don’t work but this does.
delete Object.getPrototypeOf(window.navigator).serviceWorker
delete window.ServiceWorker
delete window.ServiceWorkerRegistration
delete window.ServiceWorkerContainerSurely service worker https requests are bound by the exact same cookie rules as any third party script, resource, etc?
>Versions of Safari and embedded browsers on MacOS 10.14 and all browsers on iOS 12. These versions will erroneously treat cookies marked with `SameSite=None` as if they were marked `SameSite=Strict`. This bug has been fixed on newer versions of iOS and MacOS.
https://www.chromium.org/updates/same-site/incompatible-clie...
I've been running into this issue in an number of projects all involving SSO and custom in-house IDP implementations. It's an easy fix but getting the teams together and coordinated has been the hardest part.
That said for your use case I think you could set a first-party cookie on "widget.com" and pass that to the iframe. That would require a script on the page though as opposed to an iframe, so maybe your service worker version is easier to implement.
Why not host at usercontent.widget.com? You can pass credentials via a frame postMessage, are protected by same-origin policy, and cookies would be considered first-party
Is samesite=lax, cookie = https only not a valid config?
If you enable only the setting you specified, you won't be able to set samesite=none on http cookies, only "secure" cookies for https-only.
If you enable the other setting, cookies will default to Lax, regardless of "secure" status for the cookie.
If you enable both, the only way to have a samesite=None (totally insecure) cookie is over https and by manually specifying None.
So, I'm assuming that any Django 2.1+ site will already be compatible with this.
"This is an industry-wide change for browsers and is not something Mozilla is undertaking alone. Google has been rolling this change out to Chrome users since February 2020, with SameSite=Lax being the default for a certain (unpublished) percentage of all their channels (release, beta, canary)."
Even worse when it's retail customer facing and it works for all developers. This broke our chat widget and is probably the explanation for our declining chat numbers. Nobody connected the dots until some developers got included in the rollout. Now all hell broke lose because the business realized we've been serving a broken chat feature to some users for months.
Anybody have some background on this note?
https://openid.net/specs/oauth-v2-form-post-response-mode-1_...
At least in .NET Core I observe a cookie for the OIDC nonce (.AspNetCore.OpenIdConnect.Nonce - defends against replay attacks) and a correlation cookie (.AspNetCore.OpenIdConnect.Correlation - tracks session through the redirect handshake). Both of these are created during the login redirect sequence and not intended to live beyond it.
The correlation cookie is set to SameSite=None here
https://github.com/dotnet/aspnetcore/blob/master/src/Securit...
The nonce cookie is set to SameSite=None here
https://github.com/dotnet/aspnetcore/blob/master/src/Securit...
I’m not familiar with many other auth flows outside of OIDC/OAuth2 but I wouldn’t be surprised if other SSO-like flows have similar mechanisms
How to fix this? Anyone any clue?
I am already seeing that happen with FF unfortunately.