The list seems to be missing the simplest naughty string of all: The empty string! (Well, the text file has empty lines separating the comments and example strings so it technically includes the empty string, but it's not in the JSON file.)
Show HN: Big List of Naughty Strings for testing user-input data
31–40 of 80 posts
Re: Show HN: Big List of Naughty Strings for testing user-input data
#32Re: Show HN: Big List of Naughty Strings for testing user-input data
#33Most of what I do involves the messy world of text, and I think this is a great resource. I wish the software I depended on tested against it. I can think of a few more cases that I've seen cause havoc: - U+FEFF in the middle of a string (people are used to seeing it at the beginning of a string, because Microsoft, but elsewhere it may be more surprising) - U+0 (it's encoded as the null byte!) - U+1B (the codepoint f…
Bi-directional text is probably another one. All the bidi control characters, especially. Probably really all Unicode control characters in general.
Re: Show HN: Big List of Naughty Strings for testing user-input data
#34Nice; sort of a programming complement to Shutterstock's _List of Dirty, Naughty, Obscene, and Otherwise Bad Words_[0]. So helpful to have a bunch of minds working on useful lists like this. Good to see that GitHub passes this test! [0] https://github.com/shutterstock/List-of-Dirty-Naughty-Obscen...
There are so many creative ways to get around swearing. Replace letters with numbers, drop consonants and vowels. And you almost always need to check for word boundaries otherwise somebody from Scunthorpe might be upset you banned them. And then there are cases where word boundaries aren't enough. Good luck ;-)
Re: Show HN: Big List of Naughty Strings for testing user-input data
#35Yeah, I would make the SQL injection and command injections test a little less kinetic =). Using a simple SELECT test, like SELECT @@VERSION, would be a little safer... Edit: Forget to say thanks! This is a pretty cool list.
Re: Show HN: Big List of Naughty Strings for testing user-input data
#36Most of what I do involves the messy world of text, and I think this is a great resource. I wish the software I depended on tested against it. I can think of a few more cases that I've seen cause havoc: - U+FEFF in the middle of a string (people are used to seeing it at the beginning of a string, because Microsoft, but elsewhere it may be more surprising) - U+0 (it's encoded as the null byte!) - U+1B (the codepoint f…
The range U+FDD0..U+FDEF is reserved for internal use by applications.
Re: Show HN: Big List of Naughty Strings for testing user-input data
#37Re: Show HN: Big List of Naughty Strings for testing user-input data
#38If you really intend this for use in testing, I'd suggest making the injections less nasty. I could easily see a junior dev slapping this in and deleting some important stuff. I'd also add more invalid UTF encodings and embedded null bytes, etc. The JSON format would be preferable to plain text for that though.
Thankfully, there are no strings invoking Cthulhu :)
Re: Show HN: Big List of Naughty Strings for testing user-input data
#39If I put this into my company's tests, we'd end up with no users... I have a lot of work ahead of me. :/