[go: up one dir, main page]

Page MenuHomePhabricator

search for "endpoint" shows fatal exception “Wikimedia\Assert\PreconditionException”
Closed, DuplicatePublicSecurity

Description

Hello,

Searching endpoint in my mediaqiki make the site broken

https://wiki.addressforall.org/w/index.php?search=endpoint&title=Especial%3ABusca&wprov=acrw1

[000af88de00415e8b7de76cd] 2023-06-11 17:08:26: Exceção fatal do tipo “Wikimedia\Assert\PreconditionException”

att,
Carlos Rebollo

Event Timeline

Version
MediaWiki 1.39.3

Modules

wfLoadExtension( 'CategoryTree' );
wfLoadExtension( 'Cite' );
wfLoadExtension( 'CiteThisPage' );
wfLoadExtension( 'CodeEditor' );
wfLoadExtension( 'Gadgets' );
wfLoadExtension( 'ImageMap' );
wfLoadExtension( 'InputBox' );
wfLoadExtension( 'Interwiki' );
wfLoadExtension( 'Math' );
wfLoadExtension( 'MultimediaViewer' );
wfLoadExtension( 'Nuke' );
wfLoadExtension( 'PageImages' );
wfLoadExtension( 'ParserFunctions' );
wfLoadExtension( 'PdfHandler' );
wfLoadExtension( 'Poem' );
#wfLoadExtension( 'Renameuser' );
wfLoadExtension( 'ReplaceText' );
wfLoadExtension( 'Scribunto' );
wfLoadExtension( 'SecureLinkFixer' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
wfLoadExtension( 'TemplateData' );
wfLoadExtension( 'TextExtracts' );
wfLoadExtension( 'VisualEditor' );
wfLoadExtension( 'WikiEditor' );

wfLoadExtension( 'GeoData' );
wfLoadExtension( 'MobileFrontend' );
wfLoadExtension( 'ConfirmAccount' );
wfLoadExtension( 'UserMerge' );
wfLoadExtension( 'EmbedVideo' );
wfLoadExtension( 'JsonConfig' );
wfLoadExtension( 'Graph' );
wfLoadExtension( 'Kartographer' );

Hi @crebollo, thanks for taking the time to report this! I do not see how this is a security issue, so I am making this ticket public.

Aklapper renamed this task from search endpoint make the site broken to search for "endpoint" shows fata exception “Wikimedia\Assert\PreconditionException”.Jun 11 2023, 6:16 PM
Aklapper changed the task status from Open to Stalled.
Aklapper removed projects: Security, Security-Team.
Aklapper updated the task description. (Show Details)
Aklapper changed the visibility from "Custom Policy" to "Public (No Login Required)".
Aklapper changed the edit policy from "Custom Policy" to "All Users".

[000af88de00415e8b7de76cd] 2023-06-11 17:08:26: Exceção fatal do tipo “Wikimedia\Assert\PreconditionException”

Please provide a full stacktrace: https://www.mediawiki.org/wiki/Manual:How_to_debug

Reedy renamed this task from search for "endpoint" shows fata exception “Wikimedia\Assert\PreconditionException” to search for "endpoint" shows fatal exception “Wikimedia\Assert\PreconditionException”.Jun 12 2023, 2:28 PM

Unfortunately closing this Phabricator task as no further information has been provided.

@crebollo: After you have provided the information asked for and if this still happens, please set the status of this task back to "Open" via the Add Action...Change Status dropdown. Thanks!

Hello, this instaletion using postgresql.
Maybe using mysql?

is there problems with postgres?

Hi, please only reopen this task after you provided a full stacktrace: https://www.mediawiki.org/wiki/Manual:How_to_debug
Nothing can be done without a stacktrace.

With debug enabled

$wgShowExceptionDetails = true;
$wgShowDBErrorBacktrace = true;
$wgShowSQLErrors = true;
$wgShowExceptionDetails = true;
error_reporting( -1 );
ini_set( 'display_errors', 1 );

Erro interno
[79a9042c6c3ba32040e81061] /w/index.php?search=endpoint&title=Especial%3ABusca&wprov=acrw1 Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target.

Backtrace:

from /var/www/addressforall.org/mediawiki/w/vendor/wikimedia/assert/src/Assert.php(49)
#0 /var/www/addressforall.org/mediawiki/w/includes/Title.php(4190): Wikimedia\Assert\Assert::precondition()
#1 /var/www/addressforall.org/mediawiki/w/includes/Title.php(4171): Title->assertProperPage()
#2 /var/www/addressforall.org/mediawiki/w/includes/Revision/RevisionStore.php(1828): Title->getId()
#3 /var/www/addressforall.org/mediawiki/w/includes/Revision/RevisionStore.php(1733): MediaWiki\Revision\RevisionStore->ensureRevisionRowMatchesPage()
#4 /var/www/addressforall.org/mediawiki/w/includes/Revision/RevisionStore.php(1609): MediaWiki\Revision\RevisionStore->newRevisionFromRowAndSlots()
#5 /var/www/addressforall.org/mediawiki/w/includes/Revision/RevisionStore.php(2348): MediaWiki\Revision\RevisionStore->newRevisionFromRow()
#6 /var/www/addressforall.org/mediawiki/w/includes/Revision/RevisionStore.php(1286): MediaWiki\Revision\RevisionStore->loadRevisionFromConds()
#7 /var/www/addressforall.org/mediawiki/w/includes/search/RevisionSearchResultTrait.php(52): MediaWiki\Revision\RevisionStore->getRevisionByTitle()
#8 /var/www/addressforall.org/mediawiki/w/includes/search/RevisionSearchResult.php(16): RevisionSearchResult->initFromTitle()
#9 /var/www/addressforall.org/mediawiki/w/includes/search/SqlSearchResult.php(36): RevisionSearchResult->__construct()
#10 /var/www/addressforall.org/mediawiki/w/includes/search/SqlSearchResultSet.php(60): SqlSearchResult->__construct()
#11 /var/www/addressforall.org/mediawiki/w/includes/search/SearchResultSet.php(73): SqlSearchResultSet->extractResults()
#12 /var/www/addressforall.org/mediawiki/w/includes/search/SearchResultSet.php(184): SearchResultSet->count()
#13 /var/www/addressforall.org/mediawiki/w/includes/search/SearchEngine.php(201): SearchResultSet->shrink()
#14 /var/www/addressforall.org/mediawiki/w/includes/search/SearchEngine.php(96): SearchEngine->maybePaginate()
#15 /var/www/addressforall.org/mediawiki/w/includes/specials/SpecialSearch.php(448): SearchEngine->searchText()
#16 /var/www/addressforall.org/mediawiki/w/includes/specials/SpecialSearch.php(229): SpecialSearch->showResults()
#17 /var/www/addressforall.org/mediawiki/w/includes/specialpage/SpecialPage.php(701): SpecialSearch->execute()
#18 /var/www/addressforall.org/mediawiki/w/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run()
#19 /var/www/addressforall.org/mediawiki/w/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#20 /var/www/addressforall.org/mediawiki/w/includes/MediaWiki.php(904): MediaWiki->performRequest()
#21 /var/www/addressforall.org/mediawiki/w/includes/MediaWiki.php(562): MediaWiki->main()
#22 /var/www/addressforall.org/mediawiki/w/index.php(50): MediaWiki->run()
#23 /var/www/addressforall.org/mediawiki/w/index.php(46): wfIndexMain()
#24 {main}

Thanks for the update! Which exact MediaWiki version is this about?

Ah, ignore my last comment, this seems to be the same problem as T302812.

crebollo changed the task status from Duplicate to Resolved.Oct 15 2023, 2:11 AM