Per NikeRabbit on r88174, allow capitals in the regex
authorSam Reed <reedy@users.mediawiki.org>
Thu, 19 May 2011 21:43:58 +0000 (21:43 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 19 May 2011 21:43:58 +0000 (21:43 +0000)
includes/api/ApiQueryAllimages.php

index bdc561b..020b4b9 100644 (file)
@@ -186,7 +186,7 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase {
         * @return bool
         */
        public static function validateSha1Hash( $hash ) {
-               return preg_match( '/[a-f0-9]{40}/', $hash );
+               return preg_match( '/[a-fA-F0-9]{40}/', $hash );
        }
 
        /**
@@ -194,7 +194,7 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase {
         * @return bool
         */
        public static function validateSha1Base36Hash( $hash ) {
-               return preg_match( '/[a-z0-9]{31}/', $hash );
+               return preg_match( '/[a-zA-Z0-9]{31}/', $hash );
        }
 
        public function getAllowedParams() {