Steps to replicate the issue (include links if applicable):
- Install MediaWiki and Cargo
- Login as an account with (recreatecargodata) and (deletecargodata)
- Save the following into Template:Cargo/deletetest: <noinclude>{{#cargo_declare: _table = cargodeletetest}}</noinclude>
- Go to Template:Cargo/deletetest?action=recreatedata and create the table
- CSRF for Special:DeleteCargoTable:
- Lure the victim to go to Special:DeleteCargoTable/cargodeletetest?delete
- CSRF for Special:SwitchCargoTable:
- Go to Template:Cargo/deletetest?action=recreatedata again and create the replacement table
- Lure the victim to go to Special:SwitchCargoTable/cargodeletetest?switch
What happens?
The deletion or switch is prevented
What should have happened instead?
The deletion or switch happens
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
- MediaWiki: 1.42.1 (523b312) 15:03, 1 August 2024
- PHP: 8.1.20 (fpm-fcgi)
- MariaDB: 11.4.2-MariaDB
- Cargo: 3.6.1 (903c36c) 19:36, 6 August 2024
Other information (browser name/version, screenshots, etc.):
See also: https://www.mediawiki.org/wiki/Special:MyLanguage/Cross-site_request_forgery
Screen recording for Special:DeleteCargoTable:

