Shortid isValid()
Dimentar opened this issue · comments
Bug for the values that has special regex characters: . \ + * ? [ ^ ] $ ( ) { } = ! < > | : -
The line must be:
$ok = preg_match('/(['.$alphabet.']{'.$length.'})/', $value, $matches);
The searched $value must not be converted to preg_quote(), even if contains special regex characters.