Page MenuHomePhabricator

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

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 created this task.Apr 20 2015, 3:11 AM
Krenair raised the priority of this task from to Needs Triage.
Krenair updated the task description. (Show Details)
Krenair added a subscriber: Krenair.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 20 2015, 3:11 AM
Aklapper triaged this task as Low priority.Apr 23 2015, 10:11 AM

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 ?

TTO added a subscriber: TTO.May 30 2015, 4:03 AM

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.

Ybura added a subscriber: Ybura.Jun 1 2015, 7:17 PM

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

Umherirrender closed this task as Resolved.Jun 3 2015, 7:38 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:12 PM