Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

getValidInput always throwing an exception #18

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. $ESAPI.validator().getValidInput("test", "hello@world.com", "Email", 50, 
true);
2.
3.

What is the expected output? What do you see instead?
Expected : "hello@world.com"
seen : null

What version of the product are you using? On what operating system?
esapi4js-0.1.3

Please provide any additional information below.
a couple of issues I encountered while trying to debug:
checkEmpty function returns null or nothing. as a result the following line in 
getValidInput always returns null.


            if ( checkEmpty( sContext, sInput ) == null ) {
                return null;
            }

if I fix this, I still run into an exception in checkWhitelist. Seems like it 
is throwing an error IF the input matches the expression. 

if(sInput.match(p)) {
...
}

should it be if(!sInput.match(p)){}

?

Original issue reported on code.google.com by subodh.s...@gmail.com on 9 Sep 2013 at 4:38

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions