Page MenuHomePhabricator

Passing nonsense IDs to Special:RevisionDelete causes a fatal error
Closed, ResolvedPublicPRODUCTION ERROR

Description

RevisionDeleter::suggestTarget can just return null...
E.g. https://www.mediawiki.org/w/index.php?title=Special:RevisionDelete&type=revision&ids=100000000000000000
Apr 20 03:08:04 mw1052: #012Fatal error: Argument 3 passed to RevisionDeleter::createList() must be an instance of Title, null given in /srv/mediawiki/php-1.26wmf2/includes/revisiondelete/RevisionDeleter.php on line 89

Event Timeline

Krenair raised the priority of this task from to Needs Triage.
Krenair updated the task description. (Show Details)
Krenair subscribed.

E.g. https://www.mediawiki.org/w/index.php?title=Special:RevisionDelete&type=revision&ids=100000000000000000
Apr 20 03:08:04 mw1052: #012Fatal error: Argument 3 passed to RevisionDeleter::createList() must be an instance of Title, null >given in /srv/mediawiki/php-1.26wmf2/includes/revisiondelete/RevisionDeleter.php on line 89

Isnt this error happening because the RevisionDeleter::createList() expects a parameter 'title' which you are not passing in this case - and not - related to the id passed ?

No, see for example https://www.mediawiki.org/w/index.php?title=Special:RevisionDelete&type=revision&ids=498632, which works. The point of RevisionDeleter::suggestTarget() is to determine the relevant title based on the given revision ID(s). Obviously if the revision ID is bogus, it will fail. The point is that it should fail more gracefully.

Change 215697 had a related patch set uploaded (by Umherirrender):
Move Title null check in Special:RevisionDelete

https://gerrit.wikimedia.org/r/215697

Change 215697 merged by jenkins-bot:
Move Title null check in Special:RevisionDelete

https://gerrit.wikimedia.org/r/215697

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:12 PM