Field types
-
integer. A string of any length consisting of numbers only, without a decimal point, and with an optional preceding minus sign (-).
-
alpha. A string of any length consisting of letters only.
-
alphanum. A string of any length consisting of letters and/or numbers.
-
nohtml. A string of any length consisting of characters, including punctuation and spaces, that does not contain HTML symbols or queries.
-
any. Anything at all.Important:Assigning the any field type as the default field type, or to a field, allows active scripts, SQL commands, and other possibly dangerous content to be sent to your protected websites and applications in that form field. You must use the any type sparingly, if you use it at all.
To add a field type by using the command line interface
-
add appfw fieldType <name> <regex> <priority> [-comment "<string>"] -
save ns config
Example
add appfw fieldType SSN "^[1-9][0-9]{2,2}-[0-9}{2,2}-[0-9]{4,4}$" 1
save ns config
To modify a field type by using the command line interface
-
set appfw fieldType <name> <regex> <priority> [-comment "<string>"] -
save ns config
Example
set appfw fieldType SSN "^[1-9][0-9]{2,2}-[0-9}{2,2}-[0-9]{4,4}$" 1 -comment "US Social Security Number"
save ns config
To remove a field type by using the command line interface
-
>rm appfw fieldType <name> -
save ns config
To configure a field type by using the GUI
-
Navigate to Security > Application Firewall.
-
In the details pane, under Settings, click Manage Field Types.
-
In the Manage Field Types dialog box, do one of the following:
-
To add a new field type to the list, click Add.
-
To change an existing field type, select the field type, and then click Edit. The Configure Field Type dialog box appears.
Note:If you select an existing field type designation and then click Add, the dialog box displays the information for that field type. You can modify that information to create your new field type. -
-
In the dialog box, fill out the elements. They are:
-
Name
-
Regular Expression
-
Priority
-
Comment
-
-
Click Create or OK.
-
To remove a field type from the Field Types list, select the field type listing you want to remove, then click Remove to remove it, and then click OK to confirm your choice.
-
When you have finished adding, modifying, and removing field types, click Close.
Examples
\^[1-9][0-9]{2,2}-[0-9}{2,2}-[0-9]{4,4}$ U.S. Social Security numbers
\^\[A-C\]\[0-9\]{7,7}$ California driver's license numbers
\^+[0-9]{1,3} [0-9() -]{1,40}$ International phone numbers with country codes
\^[0-9]{5,5}-[0-9]{4,4}$ U.S. ZIP code numbers
\^[0-9A-Za-z][0-9A-Za-z.+_-]{0,25}@([0-9A-Za-z][0-9A-Za-z_-]*[.]){1,4}[A-Za-z]{2,6}$ Email addresses