3 ms·
Here's one lurking in javascript: /A-z/ includes "[]^_`" [1] Now go search github [2] and see the +1k repos that have this bug in their parsing of base64 Sou
by maerF0x0 11y ago
Here's one lurking in javascript:
/A-z/ includes "[]^_`" [1]
Now go search github [2] and see the +1k repos that have this bug in their parsing of base64
Sources:
[1]: http://wtfjs.com/2014/01/29/regular-expression-and-slash http://wtfjs.com/2014/01/29/regular-expression-and-slash
[2]: https://github.com/search?utf8=%E2%9C%93&q=INVALID_BASE64_RE&type=Code&ref=searchresults https://github.com/search?utf8=%E2%9C%93&q=INVALID_BASE64_RE...
- pxndx 11y agoThis isn't WTF at all, that's exactly how regexes should work!
- kiallmacinnes 11y agoIn case anyone is wondering why this isn't a WTF - See [1].. [1]: http://www.asciitable.com/ http://www.asciitable.com/
- maerF0x0 11y agoagreed, not my website so i couldnt control the name. Just talking about how A-z includes non(standard) base64 chars
- sandstrom 11y agoInteresting! I didn't understand it at first, but the key difference is `A-z` vs. `A-Za-z`.