From d0d2975f61db1c381dbcba7181fcf695b26ad018 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 7 Jun 2011 09:13:09 +0000 Subject: [PATCH] Fix error noticed in r88174, wasn't actually validating sha1base36 hash --- includes/api/ApiQueryFilearchive.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.20.1