Skip to content

Commit c770e83

Browse files
author
chrisisbeef
committed
Fix issue 231 inverted logic error with canonicalization.
1 parent 6f41ff2 commit c770e83

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/main/java/org/owasp/esapi/reference/DefaultEncoder.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,11 @@ public String canonicalize( String input ) {
117117
if ( input == null ) {
118118
return null;
119119
}
120+
121+
// Issue 231 - These are reverse boolean logic in the Encoder interface, so we need to invert these values - CS
120122
return canonicalize(input,
121-
ESAPI.securityConfiguration().getAllowMultipleEncoding(),
122-
ESAPI.securityConfiguration().getAllowMixedEncoding() );
123+
!ESAPI.securityConfiguration().getAllowMultipleEncoding(),
124+
!ESAPI.securityConfiguration().getAllowMixedEncoding() );
123125
}
124126

125127

0 commit comments

Comments
 (0)