Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

is_valid_sha1 now use preg_match

  • Loading branch information...
commit 34a7ebbcbab5477fc52355ac33e2a6adbd561131 1 parent 4013d0c
@Upliner Upliner authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/git.class.php
View
2  lib/git.class.php
@@ -60,7 +60,7 @@ function sha1_hex($bin)
*/
function is_valid_sha1($hex)
{
- return strlen($hex)==40;
+ return preg_match("/^[0-9a-fA-F]{40}$/",$hex)==1;
}
class Git
Please sign in to comment.
Something went wrong with that request. Please try again.