ESAPI / esapi-java-legacy

ESAPI (The OWASP Enterprise Security API) is a free, open source, web application security control library that makes it easier for programmers to write lower-risk applications.
https://owasp.org/www-project-enterprise-security-api/
Other
598 stars 363 forks source link

Fix Javadoc code example in ValidationErrorList #788

Open kwwall opened 1 year ago

kwwall commented 1 year ago

The code example in the class Javadoc section for org.owasp.esapi.ValidationErrorList is incorrect.

It currently looks like:

 ValidationErrorList() errorList = new ValidationErrorList();.
 String name  = getValidInput("Name", form.getName(), "SomeESAPIRegExName1", 255, false, errorList);
 String address = getValidInput("Address", form.getAddress(), "SomeESAPIRegExName2", 255, false, errorList);
 Integer weight = getValidInteger("Weight", form.getWeight(), 1, 1000000000, false, errorList);
 Integer sortOrder = getValidInteger("Sort Order", form.getSortOrder(), -100000, +100000, false, errorList);
 request.setAttribute( "ERROR_LIST", errorList );

But there's an extraneous period at the end of the first line, just after the semicolon, and the the 2 references to getValidInput method calls should be probably preceded by "ESAPI.validator().".