FuseGuard Logo

fuseguard.components.filters
Component IDValidationFilter

filters.BaseFilter
  |
  +--filters.IDValidationFilter

This filter validates that all input variables ending in ID are either integers, UUIDs, or simple string values

Method Summary
public boolean getAllowEmpty()
          Returns true if empty string values are allowed.
public boolean getAllowIntegerLists()
          Returns true if integer lists are allowed.
public boolean getAllowLists()
          Returns true if comma seperated lists of ids are allowed.
public array getConfigurables()
          Returns a list of configurable properties
public string getDescription()
public numeric getMaximumDigits()
          Returns max number of digits allowed for ints.
public numeric getMaximumStringLength()
          Returns maximum string length of an id.
public string getName()
public string getThreatCategory()
          Returns validation
public numeric inspectRequest()
public numeric inspectVariable([variableName scope], [any varName], [any value])
public boolean isNegativeIntegersAllowed()
          Returns true if negative integers are allowed
public boolean isNumericAllowed()
          Returns true if Numeric Values are allowed.
public boolean isUUIDAllowed()
          Returns true if UUID's are allowed.
public void setAllowEmpty([boolean allow="true"])
          When passed true (the default) allows empty strings to pass the id validation.
public void setAllowIntegerLists(boolean allow)
          Sets if integer lists are allowed eg 123,456,789
public void setAllowLists(boolean allow)
          Sets if comma seperated lists of ids are allowed.
public void setMaximumDigits(numeric digits)
          Sets the maximum amount of digits for an integer id value. Default is 11, which allows for a 32 bit signed integer. Use 20 digits to support a 64 bit integer or Long data type.
public void setMaximumStringLength(numeric length)
          Sets the maximum number of characters in an id. Default value is 128, set to at least 35 if you are using UUIDs
public void setNegativeIntegersAllowed(boolean allowed)
          Specifies if integers shold be signed or unsigned.
public void setNumericAllowed(boolean allowed)
          Specifies if Numeric Values are allowed, uses IsNumeric function to test.
public void setStringsAllowed(boolean allowed)
          Specifies if String ID's are allowed. They may only contain the characters: a-z 0-9 _ -
public void setUUIDAllowed(boolean allowed)
          Specifies if UUID's are allowed, they must be in the format returned by the CreateUUID() function. This value is ignored unless setStringsAllowed(false) is set.

Methods inherited from filters.BaseFilter
setAllowURIList, blockEnabled, ignoresVariable, setIgnoreURIList, setScopes, inspectsRequestBody, inspectsCGIScope, inspectsUrlScope, setFilterLevel, setAllowDenyOrder, filterVariables, denyURI, getFilterID, inspectsRequest, setFilterWhitelist, ignoreVariable, ignoreURI, getHelp, init, inspectVariables, getFilterComponent, getRequestLogMessageDetail, inspectsCookieScope, allowURI, setLogLevel, getBlockLevel, inspectsURI, logEnabled, hasIPWhiteList, getFilterInstanceName, filterEnabled, filterRequest, getIPWhiteListProvider, setFilterID, getFilterLevel, inspectResponse, logOnly, setIgnoreVariableList, setRequestLogMessage, setBlockLevel, setFilterInstanceName, inspectsFormScope, getLogLevel, getRequestLogMessage, getFirewall
 

Method Detail

getAllowEmpty

public boolean getAllowEmpty()
Returns true if empty string values are allowed.


getAllowIntegerLists

public boolean getAllowIntegerLists()
Returns true if integer lists are allowed.


getAllowLists

public boolean getAllowLists()
Returns true if comma seperated lists of ids are allowed.


getConfigurables

public array getConfigurables()
Returns a list of configurable properties


getDescription

public string getDescription()

getMaximumDigits

public numeric getMaximumDigits()
Returns max number of digits allowed for ints.


getMaximumStringLength

public numeric getMaximumStringLength()
Returns maximum string length of an id.


getName

public string getName()

getThreatCategory

public string getThreatCategory()
Returns validation


inspectRequest

public numeric inspectRequest()

inspectVariable

public numeric inspectVariable([variableName scope], [any varName], [any value])
Parameters:
[variableName scope]
[any varName]
[any value]

isNegativeIntegersAllowed

public boolean isNegativeIntegersAllowed()
Returns true if negative integers are allowed


isNumericAllowed

public boolean isNumericAllowed()
Returns true if Numeric Values are allowed.


isUUIDAllowed

public boolean isUUIDAllowed()
Returns true if UUID's are allowed.


setAllowEmpty

public void setAllowEmpty([boolean allow="true"])
When passed true (the default) allows empty strings to pass the id validation.

Parameters:
[boolean allow="true"] - Set to true to allow integer lists

setAllowIntegerLists

public void setAllowIntegerLists(boolean allow)
Sets if integer lists are allowed eg 123,456,789

Parameters:
boolean allow - Set to true to allow integer lists

setAllowLists

public void setAllowLists(boolean allow)
Sets if comma seperated lists of ids are allowed.

Parameters:
boolean allow - Set to true to allow lists

setMaximumDigits

public void setMaximumDigits(numeric digits)
Sets the maximum amount of digits for an integer id value. Default is 11, which allows for a 32 bit signed integer. Use 20 digits to support a 64 bit integer or Long data type.

Parameters:
numeric digits

setMaximumStringLength

public void setMaximumStringLength(numeric length)
Sets the maximum number of characters in an id. Default value is 128, set to at least 35 if you are using UUIDs

Parameters:
numeric length - The number of characters

setNegativeIntegersAllowed

public void setNegativeIntegersAllowed(boolean allowed)
Specifies if integers shold be signed or unsigned.

Parameters:
boolean allowed

setNumericAllowed

public void setNumericAllowed(boolean allowed)
Specifies if Numeric Values are allowed, uses IsNumeric function to test.

Parameters:
boolean allowed

setStringsAllowed

public void setStringsAllowed(boolean allowed)
Specifies if String ID's are allowed. They may only contain the characters: a-z 0-9 _ -

Parameters:
boolean allowed

setUUIDAllowed

public void setUUIDAllowed(boolean allowed)
Specifies if UUID's are allowed, they must be in the format returned by the CreateUUID() function. This value is ignored unless setStringsAllowed(false) is set.

Parameters:
boolean allowed