From: Sam Reed Date: Tue, 7 Jun 2011 09:13:09 +0000 (+0000) Subject: Fix error noticed in r88174, wasn't actually validating sha1base36 hash X-Git-Tag: 1.31.0-rc.0~29641 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=d0d2975f61db1c381dbcba7181fcf695b26ad018;p=lhc%2Fweb%2Fwiklou.git Fix error noticed in r88174, wasn't actually validating sha1base36 hash --- diff --git a/includes/api/ApiQueryFilearchive.php b/includes/api/ApiQueryFilearchive.php index a5462b9e13..81db1639e6 100644 --- a/includes/api/ApiQueryFilearchive.php +++ b/includes/api/ApiQueryFilearchive.php @@ -100,7 +100,7 @@ class ApiQueryFilearchive extends ApiQueryBase { } $sha1 = wfBaseConvert( $params['sha1'], 16, 36, 31 ); } elseif ( $sha1base36Set ) { - if ( !ApiQueryAllimages::validateSha1Base36Hash( $sha1 ) ) { + if ( !ApiQueryAllimages::validateSha1Base36Hash( $params['sha1base36'] ) ) { $this->dieUsage( 'The SHA1Base36 hash provided is not valid', 'invalidsha1base36hash' ); } $sha1 = $params['sha1base36']; @@ -114,7 +114,7 @@ class ApiQueryFilearchive extends ApiQueryBase { // Filter out revisions that the user is not allowed to see. There // is no way to indicate that we have skipped stuff because the // continuation parameter is fa_name - + // Note that this field is unindexed. This should however not be // a big problem as files with fa_deleted are rare $this->addWhereFld( 'fa_deleted', 0 );