This class will check if the values given is safe to be executed. If not it will replace any of the unsafe characters.

Extends AbstractFilter
Defined in: lib/filter/cmd.js:5

Methods

sanitize (value)

Inherited from AbstractFilter but overwritten in lib/filter/cmd.js:26

This method will sanitize the value, any characters no valid for a command will be stripped.

Parameters

Name Type Description
value * The value to sanitize.

Returned Value

String: The sanitized value in string form.


validate (value)

Inherited from AbstractFilter but overwritten in lib/filter/cmd.js:13

This method will check if the value given is safe to be executed.

Parameters

Name Type Description
value * The value to validate.

Returned Value

Boolean: True when the value is correct otherwise false.