rossey / big-list-of-naughty-strings
Big List of Naughty Strings is a list of strings which have a high probability of causing issues when used as user-input data.
Installs: 43
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 2
Open Issues: 3
pkg:composer/rossey/big-list-of-naughty-strings
This package is not auto-updated.
Last update: 2024-12-21 19:37:09 UTC
README
This is my PHP wrapper around Max Woolf's Big List of Naughty Strings. Thanks Max!
Setup
The big list of naughty strings repository can be included as a git submodule that lives in resources.
Composer is configured to run ./bin/install.sh on post-install which will call git submodule update.
If you don't want to use the git submodule you can manually pass a file to the NaughtyStringsFactory constructor.
Examples
composer require rossey/big-list-of-naughty-strings
$factory = new \Rossey\Blns\NaughtyStringsFactory;
foreach($factory->getNaughtyStrings() as $naughtyString) {
echo $naughtyString;
}
Factory with manual file
$factory = new \Rossey\Blns\NaughtyStringsFactory(PATH_TO_FILE);
The factory will return an array of NaughtyString objects. The NaughtyString has a __toString method so you'll need to cast it to a string.