Page MenuHomePhabricator

Foreign API requests with a CSRF token occasionally fail
Open, Needs TriagePublicBUG REPORT

Assigned To
None
Authored By
SerDIDG
Sep 5 2026, 3:53 PM
Referenced Files
F101909455: image.png
Sep 5 2026, 3:53 PM
F101909385: image.png
Sep 5 2026, 3:53 PM

Description

After some period of time after login (~2-3 weeks) cross-wiki API requests with a CSRF token start failing for certain projects while other projects work just fine. It's hard to replicate consistently, as it's not clear what the cause of this problem is. Only logging out and logging back in helps.

Currently I experience this problem with requests to Wikidata. For example, I can't unwatch pages in Global Watchlist from Wikidata:
(x-request-id: 1f36c326-e66a-480b-9869-d5e9e1a6749d)

image.png (2,190×1,391 px, 289 KB)

And looks like before sending the watch request it successfully receives a fresh watch token, so this is not a problem with an expired token itself:
(x-request-id: 11377ef2-c3c0-4d67-b815-8ae6eaedee51)

image.png (2,190×1,391 px, 219 KB)

Other information:
MediaWiki 1.47.0-wmf.18 / Windows 11 Pro 25H2 / Firefox 155.0.1