Prestachopo Posted March 28, 2011 Share Posted March 28, 2011 There is a error syntax in class Validate, in function isMd5 you can see this: static public function isMd5($md5) { return preg_match('/^[a-z0-9]{32}$/ui', $md5); } But the md5 hash never contain a-z chars, only a-f, if you try to validate this fake hash:z41z8zz98z00z204z9800998zzz8427zThe function return true, there is an error, the right regexp is '/^[a-f0-9]{32}$/ui'Best Regards. Link to comment Share on other sites More sharing options...
Thomas Didierjean Posted March 29, 2011 Share Posted March 29, 2011 Hey, nice catch. I'm fixing it. Link to comment Share on other sites More sharing options...
Prestachopo Posted March 29, 2011 Author Share Posted March 29, 2011 Same problem in isSha1, look: static public function isSha1($sha1) { return preg_match('/^[a-z0-9]{40}$/ui', $sha1); } It's a pleasure support the comunnity, thanks.Best Regards. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now