r89636 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89635‎ | r89636 | r89637 >
Date:09:13, 7 June 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix error noticed in r88174, wasn't actually validating sha1base36 hash
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryFilearchive.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryFilearchive.php
@@ -100,7 +100,7 @@
101101 }
102102 $sha1 = wfBaseConvert( $params['sha1'], 16, 36, 31 );
103103 } elseif ( $sha1base36Set ) {
104 - if ( !ApiQueryAllimages::validateSha1Base36Hash( $sha1 ) ) {
 104+ if ( !ApiQueryAllimages::validateSha1Base36Hash( $params['sha1base36'] ) ) {
105105 $this->dieUsage( 'The SHA1Base36 hash provided is not valid', 'invalidsha1base36hash' );
106106 }
107107 $sha1 = $params['sha1base36'];
@@ -114,7 +114,7 @@
115115 // Filter out revisions that the user is not allowed to see. There
116116 // is no way to indicate that we have skipped stuff because the
117117 // continuation parameter is fa_name
118 -
 118+
119119 // Note that this field is unindexed. This should however not be
120120 // a big problem as files with fa_deleted are rare
121121 $this->addWhereFld( 'fa_deleted', 0 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88174* (bug 27593) API: add error message when sha1/sha1base36 is invalidreedy13:16, 15 May 2011

Status & tagging log