function detectXSS(params, context) {
        var xssRegex   = /<script|script>|<iframe|iframe>|javascript:(?!(?:history\.(?:go|back)|void\(0\)))/i
        var parameters = context.parameter;
        var message    = '';

        Object.keys(parameters).some(function (name) {
            parameters[name].some(function (value) {
                if (xssRegex.test(value)) {
                    message = 'XSS attack: ' + value;
                    return true;
                }
            });

            if (message.length) {
                return true;
            }
        });

        return message
    }
// Simply match user input parameters at request hook
Simply match user input parameters at request hook
Simply match user input parameters at request hook
function detectXSS(params, context) {
        var xssRegex   = /<script|script>|<iframe|iframe>|javascript:(?!(?:history\.(?:go|back)|void\(0\)))/i
        var parameters = context.parameter;
        var message    = '';
        Object.keys(parameters).some(function (name) {
            parameters[name].some(function (value) {
                if (xssRegex.test(value)) {
                    message = 'XSS attack: ' + value;
                    return true;
                }
            });
            if (message.length) {
                return true;
            }
        });
        return message
    }
function detectXSS ( params , context ) { var xssRegex = / <script|script>|<iframe|iframe>|javascript:(?!(?:history\.(?:go|back)|void\(0\))) / i var parameters = context . parameter ; var message = '' ; Object . keys ( parameters ) . some ( function ( name ) { parameters [ name ] . some ( function ( value ) { if ( xssRegex . test ( value ) ) { message = 'XSS attack: ' + value ; return true ; } } ) ; if ( message . length ) { return true ; } } ) ; return message }
Simply match user input parameters at request hook
Simply match user input parameters at request hook