Jump to content

function isMd5 validate fake hash


Prestachopo

Recommended Posts

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:

z41z8zz98z00z204z9800998zzz8427z

The 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...