Skip to content

Commit 7ca5606

Browse files
committed
gracefully handle null within 'stripControls', #906
1 parent 58be169 commit 7ca5606

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public static String replaceLinearWhiteSpace( String input ) {
3939
* @return the stripped value
4040
*/
4141
public static String stripControls( String input ) {
42+
if ( input == null ) {
43+
return null;
44+
}
4245
StringBuilder sb = new StringBuilder();
4346
for ( int i=0; i<input.length(); i++ ) {
4447
char c = input.charAt( i );

0 commit comments

Comments
 (0)