Skip to content

Commit

Permalink
Merge pull request #55 from jornPay/master
Browse files Browse the repository at this point in the history
fixed validate for secret in DynamicUUID
  • Loading branch information
Andy Pieters authored Dec 6, 2018
2 parents df39dad + 89b76da commit f40c286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DynamicUUID.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function encode($serviceId, $secret, $reference, $padChar = '0', $

private static function validateSecret($strSecret)
{
if (! preg_match('//i', $strSecret)) {
if (! preg_match('/^[0-9a-f]{40}$/i', $strSecret)) {
throw new Error('Invalid secret');
}
}
Expand Down

0 comments on commit f40c286

Please sign in to comment.