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

Revision: 88432
Author:   reedy
Date:     2011-05-19 21:43:58 +0000 (Thu, 19 May 2011)
Log Message:
-----------
Per NikeRabbit on r88174, allow capitals in the regex

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

Modified: trunk/phase3/includes/api/ApiQueryAllimages.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryAllimages.php     2011-05-19 21:35:32 UTC 
(rev 88431)
+++ trunk/phase3/includes/api/ApiQueryAllimages.php     2011-05-19 21:43:58 UTC 
(rev 88432)
@@ -186,7 +186,7 @@
         * @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 @@
         * @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() {


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

Reply via email to