mothership-ec / cog

Cog
Other
2 stars 3 forks source link

String generator seems to ignore regex when using generateNatively() #449

Closed thomasjthomasj closed 8 years ago

thomasjthomasj commented 9 years ago

Looking at the code it looks like it should work, but it evidently isn't as vouchers are being created using characters that are prohibited by the regex

kuiche commented 9 years ago

Something to do with this check? https://github.com/mothership-ec/cog/blob/develop/src/Security/StringGenerator.php#L192

kuiche commented 9 years ago

We could preg_match the char that is found here. https://github.com/mothership-ec/cog/blob/develop/src/Security/StringGenerator.php#L189. Or preg_match after generation with another loop.