2 ms·
Keep using regular expressions, just stop using . and instead, define what is allowed. You're expecting an input to be a UUID? Check it with ^[a-fA-F0-9\-]{30,
by michaelt 3y ago
Keep using regular expressions, just stop using . and instead, define what is allowed.
You're expecting an input to be a UUID? Check it with ^[a-fA-F0-9\-]{30,40}$ and you know you're not getting any apostrophes or script tags or enormous inputs or empty inputs or newlines or lookalike characters or emojis.
- yencabulator 3y agoThe fault is still present in that, you shouldn't just regexp "look for needle in haystack" in a single phase when you're supposed to extract key-value pairs and operate on the author key. What happened here was that the Github employee programming this didn't bother to read the spec and/or think.