Skip to content

Commit cd6d803

Browse files
Merge branch 'develop' into issue_494
2 parents 8bffd26 + e50ff98 commit cd6d803

File tree

3 files changed

+251
-13
lines changed

3 files changed

+251
-13
lines changed

src/main/java/org/owasp/esapi/Validator.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,14 @@
4848
*/
4949
public interface Validator {
5050

51+
/**
52+
* Add a validation rule to the registry using the "type name" of the rule as the key.
53+
*/
5154
void addRule( ValidationRule rule );
5255

56+
/**
57+
* Get a validation rule from the registry with the "type name" of the rule as the key.
58+
*/
5359
ValidationRule getRule( String name );
5460

5561
/**

src/main/java/org/owasp/esapi/filters/SecurityWrapperRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public Cookie[] getCookies() {
154154
// build a new clean cookie
155155
try {
156156
// get data from original cookie
157-
String name = ESAPI.validator().getValidInput("Cookie name: " + c.getName(), c.getName(), "HTTPCookieName", sc.getIntProp("HttpUtilities.MaxHeaderNameSize"), true);
157+
String name = ESAPI.validator().getValidInput("Cookie name: " + c.getName(), c.getName(), "HTTPCookieName", sc.getIntProp("HttpUtilities.MaxHeaderNameSize"), false);
158158
String value = ESAPI.validator().getValidInput("Cookie value: " + c.getValue(), c.getValue(), "HTTPCookieValue", sc.getIntProp("HttpUtilities.MaxHeaderValueSize"), true);
159159
int maxAge = c.getMaxAge();
160160
String domain = c.getDomain();

0 commit comments

Comments
 (0)