jenkins-bot has submitted this change and it was merged. Change subject: API param validation: Set strict mode for in_array ......................................................................
API param validation: Set strict mode for in_array The in_array gives true when the allowed values contains a 0 as value, for example by namespaces, action=query&list=allpages&apnamespace=test|tset was not rejected Change-Id: I9220a955ffaf2bcb0d1d5b27c948af2f85714110 --- M includes/api/ApiBase.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 741e908..84a6ed9 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -1081,7 +1081,7 @@ if ( !$allowMultiple && count( $valuesList ) != 1 ) { // Bug 33482 - Allow entries with | in them for non-multiple values - if ( in_array( $value, $allowedValues ) ) { + if ( in_array( $value, $allowedValues, true ) ) { return $value; } -- To view, visit https://gerrit.wikimedia.org/r/57038 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9220a955ffaf2bcb0d1d5b27c948af2f85714110 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: Anomie <bjor...@wikimedia.org> Gerrit-Reviewer: Yurik <yu...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits