Skip to content

Commit e5145b1

Browse files
eigancodemasher
authored andcommitted
Do not use AlphaNum when string contains comma
Using dash in this context will create a range between `+` and `.` which allows the following characters: `+`, `,`, `-`, `.`. The ASCII range is as follow: + (43), , (44), - (45), . (46). Comma is not supported and will then crash in `write()`. (cherry picked from commit 03e8485)
1 parent 75a2918 commit e5145b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Data/AlphaNum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getLengthInBits():int{
4444
* @inheritDoc
4545
*/
4646
public static function validateString(string $string):bool{
47-
return (bool)preg_match('/^[A-Z\d %$*+-.:\/]+$/', $string);
47+
return (bool)preg_match('/^[A-Z\d %$*+\-.:\/]+$/', $string);
4848
}
4949

5050
/**

0 commit comments

Comments
 (0)