Hacker News new | past | comments | ask | show | jobs | submit login

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

[2]: https://github.com/search?utf8=%E2%9C%93&q=INVALID_BASE64_RE...




This isn't WTF at all, that's exactly how regexes should work!


In case anyone is wondering why this isn't a WTF - See [1]..

[1]: http://www.asciitable.com/


agreed, not my website so i couldnt control the name. Just talking about how A-z includes non(standard) base64 chars


Interesting!

I didn't understand it at first, but the key difference is `A-z` vs. `A-Za-z`.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: