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 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 not allowed by default
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
logEnabled, ignoreVariable, getBlockLevel, init, setScopes, setFilterLevel, getFirewall, setFilterID, filterEnabled, blockEnabled, getRequestLogMessageDetail, logOnly, getFilterInstanceName, inspectVariables, setLogLevel, ignoresVariable, getFilterID, ignoreURI, filterRequest, inspectsCGIScope, getRequestLogMessage, inspectsURI, getLogLevel, setAllowDenyOrder, inspectsCookieScope, setBlockLevel, filterVariables, setFilterInstanceName, allowURI, getHelp, inspectsUrlScope, getFilterLevel, denyURI, setRequestLogMessage, getFilterComponent, inspectsFormScope
 

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.


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 not allowed by default

Parameters:
boolean allow - Set to true to allow integer 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