What is the problem?
If I try to start an investigation from the URL Special:Investigate/Preliminary_Check (or Special:Investigate/anything), I get:
[error] [d0fd3cb1cb92fa8ab75da441] /wiki/Special:Investigate/Preliminary_Check ErrorException from line 485 of /vagrant/mediawiki/extensions/CheckUser/src/SpecialInvestigate.php: PHP Notice: Undefined index: query #0 /vagrant/mediawiki/extensions/CheckUser/src/SpecialInvestigate.php(485): MWExceptionHandler::handleError(integer, string, string, integer, array) #1 /vagrant/mediawiki/extensions/CheckUser/src/SpecialInvestigate.php(438): MediaWiki\CheckUser\SpecialInvestigate->getRedirectUrl(string) #2 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(694): MediaWiki\CheckUser\SpecialInvestigate->onSubmit(array, OOUIHTMLForm) #3 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(586): HTMLForm->trySubmit() #4 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(601): HTMLForm->tryAuthorizedSubmit() #5 /vagrant/mediawiki/includes/specialpage/FormSpecialPage.php(187): HTMLForm->show() #6 /vagrant/mediawiki/extensions/CheckUser/src/SpecialInvestigate.php(71): FormSpecialPage->execute(string) #7 /vagrant/mediawiki/includes/specialpage/SpecialPage.php(575): MediaWiki\CheckUser\SpecialInvestigate->execute(string) #8 /vagrant/mediawiki/includes/specialpage/SpecialPageFactory.php(621): SpecialPage->run(string) #9 /vagrant/mediawiki/includes/MediaWiki.php(299): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext) #10 /vagrant/mediawiki/includes/MediaWiki.php(972): MediaWiki->performRequest() #11 /vagrant/mediawiki/includes/MediaWiki.php(535): MediaWiki->main() #12 /vagrant/mediawiki/index.php(47): MediaWiki->run() #13 /var/www/w/index.php(5): require(string) #14 {main}
I don't know how likely users are to do this in reality.
But, I have done this a couple of times when my session has expired (e.g. I had to close and reopen my browser). I have tried to return to the old investigation URL with the token (e.g. ?title=Special:Investigate/Compare&token=$token) and been redirected to the Special:Investigate form but with the old URL. When I then try to submit the investigation again, I get the exception.
Steps to reproduce problem
- Go to, for example, Special:Investigate/Compare
- Enter any valid target
- Submit
Expected behavior: Investigation starts as usual. You land on the Preliminary Check page.
Observed behavior: Exception.
Environment
Wiki(s): MediaWiki 1.35.0-alpha (d3ab01b); CheckUser 2.5 (87381f8) 07:53, 13 March 2020 (local vagrant)