repro:
- set $wgGroupPermissions['*']['purge'] = false; in LocalSettings.php
- go to a page while not logged in and add ?action=purge to the url
- you can purge the page
You can patch this with this short diff:
=== modified file 'includes/actions/PurgeAction.php' --- includes/actions/PurgeAction.php 2021-09-11 04:42:22 +0000 +++ includes/actions/PurgeAction.php 2021-09-18 02:16:23 +0000 @@ -33,6 +33,10 @@ return 'purge'; } + public function getRestriction() { + return 'purge'; + } + public function getDescription() { return ''; }
I think ApiPurge is similarly unprotected but I am working on testing that. Should I open another bug if it also doesn't prevent purges?
What happens?:
You can purge the page while not logged in.
What should have happened instead?:
The expected behavior is the 'purge' permission being false for a group prevents the purge action.
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
MediaWiki 1.36.1