r101524 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101523‎ | r101524 | r101525 >
Date:20:43, 1 November 2011
Author:cryptocoryne
Status:ok
Tags:
Comment:
fixed potential vulnerability and bad code
Modified paths:
  • /trunk/extensions/CheckUser/api/ApiQueryCheckUser.php (modified) (history)
  • /trunk/extensions/CheckUser/api/ApiQueryCheckUserLog.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/api/ApiQueryCheckUser.php
@@ -13,7 +13,9 @@
1414
1515 $db = $this->getDB( DB_SLAVE );
1616 $params = $this->extractRequestParams();
17 - extract( $params );
 17+
 18+ list( $request, $target, $reason, $timecond, $limit, $xff ) = array( $params['request'],
 19+ $params['target'], $params['reason'], $params['timecond'], $params['limit'], $params['xff'] );
1820
1921 if ( !$wgUser->isAllowed( 'checkuser' ) ) {
2022 $this->dieUsage( 'You need the checkuser right', 'permissionerror' );
Index: trunk/extensions/CheckUser/api/ApiQueryCheckUserLog.php
@@ -16,8 +16,9 @@
1717 if ( !$wgUser->isAllowed( 'checkuser-log' ) ) {
1818 $this->dieUsage( 'You need the checkuser-log right', 'permissionerror' );
1919 }
20 -
21 - extract( $params );
 20+
 21+ list( $user, $limit, $target, $from, $to ) = array( $params['user'], $params['limit'],
 22+ $params['target'], $params['from'], $params['to'] );
2223
2324 $this->addTables( 'cu_log' );
2425 $this->addOption( 'LIMIT', $limit + 1 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101329Fixing and improvement code of CheckUser API modulecryptocoryne00:09, 31 October 2011

Status & tagging log