From: Sam Reed Date: Thu, 19 May 2011 21:43:58 +0000 (+0000) Subject: Per NikeRabbit on r88174, allow capitals in the regex X-Git-Tag: 1.31.0-rc.0~30068 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=ac4210cbe1006f6f88bae1cf4a49014f4eb1a3b6;p=lhc%2Fweb%2Fwiklou.git Per NikeRabbit on r88174, allow capitals in the regex --- diff --git a/includes/api/ApiQueryAllimages.php b/includes/api/ApiQueryAllimages.php index bdc561b500..020b4b932b 100644 --- a/includes/api/ApiQueryAllimages.php +++ b/includes/api/ApiQueryAllimages.php @@ -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() {