Page MenuHomePhabricator

Using Special:Book while blocked shouldn't result in an exception
Open, LowPublic

Description

2013-09-16 15:07:16 mw1185 enwiki: [3fe078ba] /wiki/Special:Book   Exception from line 1216 of /usr/local/apache/common-local/php-1.22wmf16/includes/api/ApiBase.php: You have been blocked from editing
#0 /usr/local/apache/common-local/php-1.22wmf16/includes/api/ApiBase.php(1437): ApiBase->dieUsage('You have been b...', 'blocked')
#1 /usr/local/apache/common-local/php-1.22wmf16/includes/api/ApiEditPage.php(120): ApiBase->dieUsageMsg(Array)
#2 /usr/local/apache/common-local/php-1.22wmf16/includes/api/ApiMain.php(834): ApiEditPage->execute()
#3 /usr/local/apache/common-local/php-1.22wmf16/includes/api/ApiMain.php(349): ApiMain->executeAction()
#4 /usr/local/apache/common-local/php-1.22wmf16/extensions/Collection/Collection.body.php(973): ApiMain->execute()
#5 /usr/local/apache/common-local/php-1.22wmf16/extensions/Collection/Collection.body.php(240): SpecialCollection->saveCollection(Object(Title), false)
#6 /usr/local/apache/common-local/php-1.22wmf16/includes/SpecialPage.php(631): SpecialCollection->execute(NULL)
#7 /usr/local/apache/common-local/php-1.22wmf16/includes/SpecialPageFactory.php(490): SpecialPage->run(NULL)
#8 /usr/local/apache/common-local/php-1.22wmf16/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#9 /usr/local/apache/common-local/php-1.22wmf16/includes/Wiki.php(590): MediaWiki->performRequest()
#10 /usr/local/apache/common-local/php-1.22wmf16/includes/Wiki.php(459): MediaWiki->main()
#11 /usr/local/apache/common-local/php-1.22wmf16/index.php(55): MediaWiki->run()
#12 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#13 {main}

Version: master
Severity: normal

Details

Reference
bz54179

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:50 AM
bzimport added a project: Collection.
bzimport set Reference to bz54179.
bzimport added a subscriber: Unknown Object (MLST).
Reedy created this task.Sep 16 2013, 7:38 PM

Change 84435 had a related patch set uploaded by saper:
bug 54179: Fix exception on collection save

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

demon set Security to None.
hashar lowered the priority of this task from High to Low.Jun 1 2015, 2:50 PM
Reedy updated the task description. (Show Details)Aug 13 2015, 7:39 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 13 2015, 7:39 PM
Krinkle added a subscriber: Krinkle.

Steps to reproduce this issue:

  • Get your account blocked, e.g. ask a sysop to block it for 2 hours on test2.wikipedia.org.
  • Open https://test2.wikipedia.org/wiki/Special:Book
  • Create a chapter, "Test", then navigate to a random page, and use the book interface that is atop every page to "Add this page to your book".
  • Go back to Special:Book, then on the bottom right enter a name in the input field after "User:<Name>/Books/", and press "Save book".
[W5CDKwpAICkAAGu5jYwAAACH] /wiki/Special:Book ApiUsageException from line 2056 of /srv/mediawiki/php-1.32.0-wmf.20/includes/api/ApiBase.php: You have been blocked from editing.

Backtrace:

#0 /srv/mediawiki/php-1.32.0-wmf.20/includes/api/ApiBase.php(2108): ApiBase->dieStatus(Status)
#1 /srv/mediawiki/php-1.32.0-wmf.20/includes/api/ApiEditPage.php(120): ApiBase->checkTitleUserPermissions(Title, array)
#2 /srv/mediawiki/php-1.32.0-wmf.20/includes/api/ApiMain.php(1587): ApiEditPage->execute()
#3 /srv/mediawiki/php-1.32.0-wmf.20/includes/api/ApiMain.php(500): ApiMain->executeAction()
#4 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Collection/Collection.body.php(1036): ApiMain->execute()
#5 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Collection/Collection.body.php(344): SpecialCollection->saveCollection(Title, boolean)
#6 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Collection/Collection.body.php(223): SpecialCollection->processSaveCollectionCommand()
#7 /srv/mediawiki/php-1.32.0-wmf.20/includes/specialpage/SpecialPage.php(569): SpecialCollection->execute(NULL)
#8 /srv/mediawiki/php-1.32.0-wmf.20/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(NULL)
#9 /srv/mediawiki/php-1.32.0-wmf.20/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#10 /srv/mediawiki/php-1.32.0-wmf.20/includes/MediaWiki.php(868): MediaWiki->performRequest()
#11 /srv/mediawiki/php-1.32.0-wmf.20/includes/MediaWiki.php(525): MediaWiki->main()
#12 /srv/mediawiki/php-1.32.0-wmf.20/index.php(42): MediaWiki->run()
#13 /srv/mediawiki/w/index.php(3): include(string)
#14 {main}

The extension needs to catch this and/or check permissions beforehand, and respond with a (localised) permissions error message. Currently, however, the system is effectively crashing and displaying an application error (instead of a user error), which raise our global error levels for MediaWiki, App servers and Varnish - which can falsely trigger alarms.

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