http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89636

Revision: 89636
Author:   reedy
Date:     2011-06-07 09:13:09 +0000 (Tue, 07 Jun 2011)
Log Message:
-----------
Fix error noticed in r88174, wasn't actually validating sha1base36 hash

Modified Paths:
--------------
    trunk/phase3/includes/api/ApiQueryFilearchive.php

Modified: trunk/phase3/includes/api/ApiQueryFilearchive.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryFilearchive.php   2011-06-07 09:09:57 UTC 
(rev 89635)
+++ trunk/phase3/includes/api/ApiQueryFilearchive.php   2011-06-07 09:13:09 UTC 
(rev 89636)
@@ -100,7 +100,7 @@
                                }
                                $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 @@
                        // 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 );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to