Uploading images sometimes will give invalid csrf token (some cookies are misusing the recommended "SameSite" attribute)

When this happen i need to refresh Firefox and then i can upload back images.

As for the missing SameSite attribute value / as for the yellow background text:

Most likely upstream issue.

⚓ T325663 Audit use of cookies #2

In short: MediaWiki I guess uses different code paths for creating cookies. That’s why some cookies are missing that setting.

I don’t think this warning causing the invalid CSRF token issue.


might be caused by this:



Does this sounds like the issue…?

maybe and maybe the upload extension itself causing the issue as per:

Also it seems like extensions can set their own cookies but they’re not using a MediaWiki’s core API for that. Maybe MediaWiki’s extensions should be encouraged to use (a maybe yet to be invented) API to set cookies and MediaWiki’s core should add a warning encouraging extensions to use that API?

So, if there is a way to check if the extension is adhering to the same wiki configurations, that would be nice. Additionally, a newer version of the extension might be able to fix the issue.