From b5adbc772c076cbc15f87777937160bd1753aa34 Mon Sep 17 00:00:00 2001 From: Reedy Date: Thu, 29 Mar 2012 15:38:36 +0100 Subject: [PATCH] Bug 35583 - GitInfo::isSHA1 returns true for non-sha1 values Patch by Alexis Change-Id: I6c69d017d2d6ad1237b0c34ffa8a7ae5fb518178 --- includes/GitInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/GitInfo.php b/includes/GitInfo.php index bc3f35e3d1..618ae94721 100644 --- a/includes/GitInfo.php +++ b/includes/GitInfo.php @@ -46,7 +46,7 @@ class GitInfo { * @return bool Whether or not the string looks like a SHA1 */ public static function isSHA1( $str ) { - return !!preg_match( '/^[0-9A-Z]{40}$/i', $str ); + return !!preg_match( '/^[0-9A-F]{40}$/i', $str ); } /** @@ -119,4 +119,4 @@ class GitInfo { return self::repo()->getCurrentBranch(); } -} \ No newline at end of file +} -- 2.20.1