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 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 isUUIDAllowed()
          Returns true if UUID's 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 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

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


isUUIDAllowed

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


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

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