y1z2g3 / owasp-esapi-java

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

Minor length-checking error message problem #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In esapi.reference.validation, StringValidationRule.java:

Lines 99-102:

// check length
if (canonical.length() < minLength) {
    throw new ValidationException( context + ": Invalid input. The maximum
length of " + maxLength + " characters was exceeded.", "Input exceeds
maximum allowed length of " + maxLength + " by " +
(canonical.length()-maxLength) + " characters: context=" + context + ",
type=" + getTypeName() + "), input=" + input, context );
}

The error message is incorrect. It should say something like: "The minimum
number of characters (" + minLength + ") was not met."

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

Latest SVN of ESAPI.

Original issue reported on code.google.com by cyounk...@gmail.com on 1 Jul 2009 at 3:40

GoogleCodeExporter commented 8 years ago
Sorry. Fixed this one recently and didn't realize there was already an issue 
for it.
Looks like revision 814.

Original comment by schal...@darkmist.net on 17 Nov 2009 at 3:30