From commits-return-49182-archive-asf-public=cust-asf.ponee.io@cxf.apache.org Tue May 8 15:09:07 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E565318063B for ; Tue, 8 May 2018 15:09:06 +0200 (CEST) Received: (qmail 67350 invoked by uid 500); 8 May 2018 13:09:06 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 67341 invoked by uid 99); 8 May 2018 13:09:06 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2018 13:09:06 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 4B24980B1F; Tue, 8 May 2018 13:09:05 +0000 (UTC) Date: Tue, 08 May 2018 13:09:05 +0000 To: "commits@cxf.apache.org" Subject: [cxf-fediz] branch 1.4.x-fixes updated: Ensure relayState is url-encoded as well MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152578494525.26317.17444938178049495946@gitbox.apache.org> From: ilgrosso@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: cxf-fediz X-Git-Refname: refs/heads/1.4.x-fixes X-Git-Reftype: branch X-Git-Oldrev: 0dbd307e8f32f372e905fe7f7d0add5581320927 X-Git-Newrev: 159a36bd6423cbae18f360bd171dbbdbb20ab690 X-Git-Rev: 159a36bd6423cbae18f360bd171dbbdbb20ab690 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. ilgrosso pushed a commit to branch 1.4.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf-fediz.git The following commit(s) were added to refs/heads/1.4.x-fixes by this push: new 159a36b Ensure relayState is url-encoded as well 159a36b is described below commit 159a36bd6423cbae18f360bd171dbbdbb20ab690 Author: Francesco Chicchiriccò AuthorDate: Tue May 8 15:08:35 2018 +0200 Ensure relayState is url-encoded as well --- .../cxf/fediz/service/idp/beans/samlsso/AuthnRequestParser.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestParser.java b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestParser.java index 75dfe4e..a299499 100644 --- a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestParser.java +++ b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestParser.java @@ -292,9 +292,10 @@ public class AuthnRequestParser { sig.initVerify(validatingCert); // Recreate request to sign - String requestToSign = SSOConstants.SAML_REQUEST + "=" + URLEncoder.encode(samlRequest, "UTF-8") - + "&" + SSOConstants.RELAY_STATE + "=" + relayState + "&" + SSOConstants.SIG_ALG - + "=" + URLEncoder.encode(processedSigAlg, StandardCharsets.UTF_8.name()); + String requestToSign = + SSOConstants.SAML_REQUEST + "=" + URLEncoder.encode(samlRequest, StandardCharsets.UTF_8.name()) + + "&" + SSOConstants.RELAY_STATE + "=" + URLEncoder.encode(relayState, StandardCharsets.UTF_8.name()) + + "&" + SSOConstants.SIG_ALG + "=" + URLEncoder.encode(processedSigAlg, StandardCharsets.UTF_8.name()); sig.update(requestToSign.getBytes(StandardCharsets.UTF_8)); -- To stop receiving notification emails like this one, please contact ilgrosso@apache.org.