add crlf exception and exception mapper

This commit is contained in:
Mohamed Karray
2018-09-06 13:54:52 +02:00
parent 85999904b3
commit 6acfb38132
5 changed files with 48 additions and 4 deletions

View File

@@ -0,0 +1,8 @@
package sonia.scm.util;
public class CRLFInjectionException extends IllegalArgumentException{
public CRLFInjectionException(String message) {
super(message);
}
}

View File

@@ -344,8 +344,7 @@ public final class HttpUtil
"parameter \"{}\" contains a character which could be an indicator for a crlf injection",
parameter);
throw new IllegalArgumentException(
"parameter contains an illegal character");
throw new CRLFInjectionException("parameter contains an illegal character");
}
}