Page MenuHomePhabricator

ApiQueryAllMessages does not validate language code
Closed, ResolvedPublic

Description

<?xml version="1.0"?>
<api>

<error code="internal_api_error_MWException" info="Exception Caught: Invalid language code "<html>"" xml:space="preserve">

#0 /www/translatewiki.net/w/languages/Language.php(189): Language::newFromCode('<html>')
#1 /www/translatewiki.net/w/includes/api/ApiQueryAllMessages.php(45): Language::factory('<html>')
#2 /www/translatewiki.net/w/includes/api/ApiQuery.php(273): ApiQueryAllMessages->execute()
#3 /www/translatewiki.net/w/includes/api/ApiMain.php(840): ApiQuery->execute()
#4 /www/translatewiki.net/w/includes/api/ApiMain.php(380): ApiMain->executeAction()
#5 /www/translatewiki.net/w/includes/api/ApiMain.php(351): ApiMain->executeActionWithErrorHandling()
#6 /www/translatewiki.net/w/api.php(77): ApiMain->execute()
#7 {main}

</error>
</api>


Version: 1.21.x
Severity: normal
URL: http://translatewiki.net/w/api.php?action=query&meta=allmessages&ammessages=august|mainpage&amlang=%3Chtml%3E

Details

Reference
bz45937

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 1:33 AM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz45937.

Gerrit change 53362