Repository: syncope Updated Branches: refs/heads/2_0_X 6623c9e76 -> f03c9ac09 refs/heads/master 032fdf548 -> 2a611ced3
Avoid CR / LF when setting the X-Application-Error-Info HTTP header value Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/f03c9ac0 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f03c9ac0 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f03c9ac0 Branch: refs/heads/2_0_X Commit: f03c9ac09d58a6955e84a961cacda025abf384f6 Parents: 6623c9e Author: Francesco Chicchiriccò <ilgro...@apache.org> Authored: Wed Apr 26 17:38:54 2017 +0200 Committer: Francesco Chicchiriccò <ilgro...@apache.org> Committed: Wed Apr 26 17:38:54 2017 +0200 ---------------------------------------------------------------------- .../org/apache/syncope/common/lib/types/ClientExceptionType.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/f03c9ac0/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java index 86bae14..9954b9b 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java @@ -98,7 +98,8 @@ public enum ClientExceptionType { } public String getInfoHeaderValue(final String value) { - return name() + ":" + value; + // HTTP header values cannot contain CR / LF + return (name() + ":" + value).replaceAll("(\\r|\\n)", " "); } public Response.Status getResponseStatus() {