Debian Codegraph @

src/test/resources/esapi/validation.properties

raw
1 # OWASP Enterprise Security API (ESAPI) Properties file -- TEST Version
2 #############################################################################
3 #
4 # WARNING WARNING WARNING WARNING WARNING WARNING
5 #
6 # ####### # #
7 # # ###### #### ##### # # ###### ##### ####
8 # # # # # # # # # # #
9 # # ##### #### # # # ##### # # ####
10 # # # # # # # # ##### #
11 # # # # # # # # # # # # #
12 # # ###### #### # # ###### # # ####
13 #
14 # The ESAPI validator does many security checks on input, such as canonicalization
15 # and whitelist validation. Note that all of these validation rules are applied *after*
16 # canonicalization. Double-encoded characters (even with different encodings involved,
17 # are never allowed.
18 #
19 # To use:
20 #
21 # First set up a pattern below. You can choose any name you want, prefixed by the word
22 # "Validation." For example:
23 # Validation.Email=^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\\.[a-zA-Z]{2,4}$
24 #
25 # Then you can validate in your code against the pattern like this:
26 # ESAPI.validator().isValidInput("User Email", input, "Email", maxLength, allowNull);
27 # Where maxLength and allowNull are set for you needs, respectively.
28 #
29 # But note, when you use boolean variants of validation functions, you lose critical
30 # canonicalization. It is preferable to use the "get" methods (which throw exceptions) and
31 # and use the returned user input which is in canonical form. Consider the following:
32 #
33 # try {
34 # someObject.setEmail(ESAPI.validator().getValidInput("User Email", input, "Email", maxLength, allowNull));
35 #
36 Validator.SafeString=^[.\\p{Alnum}\\p{Space}]{0,1024}$
37 #Given the discussion: https://github.com/ESAPI/esapi-java-legacy/issues/374, a better upper-bound for domain name
38 #was selected as 62. This is slightly under the length in RFC-1035
39 Validator.Email=^[A-Za-z0-9._%'-]+@[A-Za-z0-9.-]+\\.[a-zA-Z]{2,62}$
40 Validator.Gmail=^[A-Za-z0-9._%'-+]+@[A-Za-z0-9.-]+\\.[a-zA-Z]{2,62}$
41 Validator.IPAddress=^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
42 #Validator.URL=^(?:ht|f)tp(s?+)\\:\\/\\/[0-9a-zA-Z](?:[-.\\w]*[0-9a-zA-Z])*(?::(?:0-9)*)*(?:\\/?+)(?:[-a-zA-Z0-9\\.\\?\\,\\:\\'\\/\\\\\\+=&%\\$#_]*)?+$
43 Validator.URL=^(?:ht|f)tp(?:s?)(?:[:A-Za-z0-9%/#?&.=-]*)$
44 Validator.CreditCard=^(\\d{4}[- ]?){3}\\d{4}$
45 Validator.SSN=^(?!000)([0-6]\\d{2}|7([0-6]\\d|7[012]))([ -]?)(?!00)\\d\\d\\3(?!0000)\\d{4}$
46 #RegexString here is PURELY for regression testing purposes. NOT for production use.
47 Validator.RegexString=^[^<>]*
48 Validator.avaloqLooseSafeString=^[+>=<?!%_,~:@|\\-\\/\\*\\&\\;\\.\\#\\n\\r\\p{Pd}\\p{Ps}\\p{Pe}\\p{Pc}\\p{N}\\p{L}\\p{Sc}\\p{Z}]{0,10000}$