mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 10:41:06 +01:00
add crlf exception and exception mapper
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package sonia.scm.util;
|
||||
|
||||
public class CRLFInjectionException extends IllegalArgumentException{
|
||||
|
||||
public CRLFInjectionException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user