You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2017/04/26 15:39:21 UTC

[1/2] syncope git commit: Avoid CR / LF when setting the X-Application-Error-Info HTTP header value

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� <il...@apache.org>
Authored: Wed Apr 26 17:38:54 2017 +0200
Committer: Francesco Chicchiricc� <il...@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() {


[2/2] syncope git commit: Avoid CR / LF when setting the X-Application-Error-Info HTTP header value

Posted by il...@apache.org.
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/2a611ced
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/2a611ced
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/2a611ced

Branch: refs/heads/master
Commit: 2a611ced3006d6043892e910142f617e2b626aa6
Parents: 032fdf5
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Wed Apr 26 17:38:54 2017 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Wed Apr 26 17:39:03 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/2a611ced/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() {