Steps to reproduce
- Create a page with the title New page title.
- Log-in to an account with delete, deleterevision, deletedhistory and deletelogentry rights.
- Navigate to Special:Delete/New_page_title, and delete the page.
- Navigate to Special:Log?page=New_page_title. Select the checkbox next to both log events, and click "Change visibility of selected log entries".
- In the "Set visibility restrictions" box, select the "Hidden" option under "Hide target and parameters". Click "Apply to selected revisions".
- At this point, it is no longer publicly known that a page with the title New page title has previously existed.
- While logged-in as any account (or while not logged in at all), create a page again with the title New page title.
What happens?
The edit creating the new page is tagged with 'Recreated' (mw-recreated).
What should have happened?
As the fact that a page previously existed at this title was not public knowledge (due to the targets of the log events relating to it being hidden), MediaWiki should not have revealed its previous existence by tagging the first revision of the new page with mw-recreated.
Notes
- I reproduced this issue locally using mediawiki/core at 994c540, created using the instructions in the local development quickstart.
- The 'Recreated' tagging feature was added in T56145: Tag page creations of previously deleted pages / https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1091761.
- I assume that this may be a relatively minor infoleak, and (IIUC) the behaviour has only been present since 1.44.0-wmf.13, but creating a security task for it out of an abundance of caution.
- I've been working on a patch to (hopefully) correct this issue — but I noticed that testDoUpdatesTagsEditAsRecreatedWhenDeletedLogEntry currently appears to specifically test for this infoleak-ing behaviour(?) -- If I'm not misunderstanding anything, DerivedPageDataUpdaterTest.php#L1290 hides the target of the mock deletion log entry, prior to L1296 asserting the presence of the mw-recreated tag.
