From: Alex Monk Date: Fri, 15 Feb 2013 20:54:00 +0000 (+0000) Subject: (bug 45017) Check whether this request is a POST before allowing a query module to... X-Git-Tag: 1.31.0-rc.0~20673^2 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=bf7b7908ea559af8d14ca3f64fd517f1b9807deb;p=lhc%2Fweb%2Fwiklou.git (bug 45017) Check whether this request is a POST before allowing a query module to run, if required by the query module Change-Id: Ie08fd3a887390e2ead6f6d6fe1e16fa8f8617a2c --- diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 619d1cae51..c1a04075b9 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -276,6 +276,10 @@ class ApiQuery extends ApiBase { // object by adding extra fields from the page table. // This function will gather all the extra request fields from the modules. foreach ( $modules as $module ) { + if ( !$this->getRequest()->wasPosted() && $module->mustBePosted() ) { + $this->dieUsageMsgOrDebug( array( 'mustbeposted', $module->getModuleName() ) ); + } + $module->requestExtraData( $this->mPageSet ); }