big-list-of-naughty-strings icon indicating copy to clipboard operation
big-list-of-naughty-strings copied to clipboard

Python escape sequences

Open sitsofe opened this issue 9 years ago • 2 comments

Sometimes you find python escape characters are accepted (and decoded) where they shouldn't be. E.g. something that only accepts alphanumerics goes on to accept \60 because unescaped it turns into the character '0' but after validation is passed it gets stored as "\60", thus coming back to bite you when it's read back and not unescaped.

sitsofe avatar Aug 18 '15 16:08 sitsofe

Sounds like it's a good thing that it bites you. A new edge case to consider.

PixelPartner avatar Feb 23 '18 13:02 PixelPartner

@PixelPartner well, I'm not sure yet another edge cases is necessarily a better thing in the grand scheme of things insofar as complexity isn't really a desirable goal in and of itself. Exactly how you getting bitten is not necessarily an instant stop/error either - it will be program logic dependent. However I do think this makes Python escape sequences a good candidate for being a "naughty string" that needs to be handled well.

sitsofe avatar Feb 23 '18 14:02 sitsofe