vidyuthd / owasp-esapi-java

Automatically exported from code.google.com/p/owasp-esapi-java
0 stars 0 forks source link

how can we use esapi in java for validation,please see files attached containing java code and for errors #229

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi All,
       I require one help regarding the implementation for esapi in java.when i am providing an input as 
instance.isValidInput("test", "hello@world.com", "Email", 100, false)
then it throws the following error on console--->
WARNING: SECURITY-FAILURE Anonymous@unknown:unknown -- Invalid input: 
context=test, type=Email( Email), input=hello@world.com
    ValidationException @ org.owasp.esapi.reference.DefaultValidator.getValidInput(null:-1)
false

On using this as Input to my source code--->getValidInput("test", 
"hello12@world.com", "Email", 100, false)
i get the following error as --->

Jun 22, 2011 11:34:16 AM AppNameNotSpecified IntrusionDetector
WARNING: SECURITY-FAILURE Anonymous@unknown:unknown -- Invalid input: 
context=test, type=Email( Email), input=hello12@world.com
    ValidationException @ org.owasp.esapi.reference.DefaultValidator.getValidInput(null:-1)
org.owasp.esapi.errors.ValidationException: test: Invalid input. Please conform 
to: Email with a maximum length of 100
    at org.owasp.esapi.reference.DefaultValidator.getValidInput(Unknown Source)
    at Esapi.testIsValidEmail(Esapi.java:38)
    at Esapi.main(Esapi.java:49)

can anyone please suggest on the above errors
Appreciate your help !!!

Original issue reported on code.google.com by arjunpro...@gmail.com on 22 Jun 2011 at 6:53

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

Please check issue no 151.
This will resolve your issue.
You have to add regex for your email validation.

https://code.google.com/p/owasp-esapi-java/issues/detail?id=151&can=1&colspec=ID
%20Type%20Status%20Priority%20Milestone%20Component%20Owner%20Summary&start=100

Original comment by tejas.ma...@gmail.com on 20 Jul 2011 at 1:25