rossey/big-list-of-naughty-strings

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (v1.0.1) of this package.

Big List of Naughty Strings is a list of strings which have a high probability of causing issues when used as user-input data.

v1.0.1 2016-10-11 12:59 UTC

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.