FrozenNode / XssInput

A simple extension of the Laravel Input facade that mimics CodeIgniter's xss filtering
41 stars 20 forks source link

Feature: Boolean check for whether input was filtered or not #11

Open fireproofsocks opened 9 years ago

fireproofsocks commented 9 years ago

Thanks for this handy library!

I've come across a few situations where it would be helpful to have a function that would detect whether or not Input contained malicious input or not. This could apply to one specific input (e.g. something like Input::hasXss('field') ) or it could apply to the input as a whole (e.g. Input::hasXss() -- implies checking the entire Input::all() array). Knowing if/when submitted data contains malicious code could be useful when dynamically adjusting an application firewall or by blocking input from certain sources or users. (It's understood that there might be false positives).

I'll look into a pull request, but I thought I'd make the request official here.