Skip to main content

1 reply

5-Regular Member
September 14, 2017

Hi Akira Nishi​ can you please share the validation.properties file with us here? Also what's the exact error message you are getting? And which OS version and Tomcat version are you working with? Also, which persistence provider are you using?

anishi14-AlexandriteAuthor
14-Alexandrite
September 14, 2017

Hi Sushant,

I cannot find upload attach file in this site so here is body-text of validation.properties file.

---

#   Validation.Email=^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\\.[a-zA-Z]{2,4}$

#

# Then you can validate in your code against the pattern like this:

#   Validator.getInstance().getValidDataFromBrowser( "Email", input );

#   Validator.getInstance().isValidDataFromBrowser( "Email", input );

#

Validator.SafeString=^[\p{L}\p{N}.]{0,1024}$

Validator.Email=^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\\.[a-zA-Z]{2,4}$

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]?)$

Validator.URL=^(ht|f)tp(s?)\\:\\/\\/[0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*(:(0-9)*)*(\\/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'\\/\\\\\\+=&%\\$#_]*)?$

Validator.CreditCard=^(\\d{4}[- ]?){3}\\d{4}$

Validator.SSN=^(?!000)([0-6]\\d{2}|7([0-6]\\d|7[012]))([ -]?)(?!00)\\d\\d\\3(?!0000)\\d{4}$

# Validators used by ESAPI

Validator.AccountName=^[a-zA-Z0-9]{3,20}$

Validator.SystemCommand=^[a-zA-Z\\-\\/]{0,64}$

Validator.RoleName=^[a-z]{1,20}$

Validator.Redirect=^\\/test.*$

# Global HTTP Validation Rules

# Values with Base64 encoded data (e.g. encrypted state) will need at least [a-zA-Z0-9\/+=]

Validator.HTTPScheme=^(http|https)$

Validator.HTTPServerName=^[a-zA-Z0-9_.\\-]*$

Validator.HTTPParameterName=^[a-zA-Z0-9_]{0,32}$

Validator.HTTPParameterValue=^[a-zA-Z0-9.\\-\\/+=_, \u00A1-\uFFFF]*$

Validator.HTTPParameterValue_reason=^[a-zA-Z0-9.\\-\\/+=_,/:\\n@$ ]*$

Validator.HTTPCookieName=^[a-zA-Z0-9\\-_]{0,32}$

Validator.HTTPCookieValue=^[a-zA-Z0-9\\-\\/+=_ ]*$

#Validator.HTTPCookieValue=^[a-zA-Z0-9-\\/+=_%;\. ]*$

Validator.HTTPHeaderName=^[a-zA-Z0-9\\-_]{0,32}$

Validator.HTTPHeaderValue=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$

Validator.HTTPHeaderValue_cookie=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_| ]*$

Validator.HTTPContextPath=^[a-zA-Z0-9.\\-_]*$

Validator.HTTPPath=^[a-zA-Z0-9.\\-_]*$

Validator.HTTPQueryString=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ](1,50)$

Validator.HTTPURI=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$

Validator.HTTPURL=^.*$

Validator.HTTPJSESSIONID=^[A-Z0-9]{10,30}$

# Validation of file related input

Validator.FileName=^[a-zA-Z0-9!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{0,255}$

Validator.DirectoryName=^[a-zA-Z0-9:\\\\!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{0,255}$

---

Error message says

HTTP ERROR 500

It does not forward to right URL.

Best regards

Akira

5-Regular Member
September 14, 2017

Akira, did you keep this file during upgrade process? the value set for Validator.Redirect=^\\/test.*$ is incorrect. It should be pointing to thingworx something like this Validator.Redirect=^\\/Thingworx.*$

I'd recommend to stop Tomcat > backup and remove the validation.properties file from \\ThingworxStorage\esapi > Restart Tomcat . This will auto-generate new validation.properties file in that location. This should fix your issue.