Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6C8CB200B84 for ; Mon, 8 Aug 2016 03:50:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6B610160A87; Mon, 8 Aug 2016 01:50:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BC198160AB1 for ; Mon, 8 Aug 2016 03:50:22 +0200 (CEST) Received: (qmail 64702 invoked by uid 500); 8 Aug 2016 01:50:22 -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 64657 invoked by uid 99); 8 Aug 2016 01:50:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2016 01:50:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B6AC0E2F35; Mon, 8 Aug 2016 01:50:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: reta@apache.org To: commits@cxf.apache.org Date: Mon, 08 Aug 2016 01:50:22 -0000 Message-Id: <61e20aefc9dc43c78e114f4f56d88c2e@git.apache.org> In-Reply-To: <102427ab420b4332b7b7f282dcf92e09@git.apache.org> References: <102427ab420b4332b7b7f282dcf92e09@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/27] cxf git commit: [CXF-6985] URL-encoding the state parameter archived-at: Mon, 08 Aug 2016 01:50:23 -0000 [CXF-6985] URL-encoding the state parameter Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c2af9591 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c2af9591 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c2af9591 Branch: refs/heads/master-jaxrs-2.1 Commit: c2af9591a9208f136bac4590e06a39392cfe0a9a Parents: 8fdb091 Author: Sergey Beryozkin Authored: Tue Aug 2 14:29:50 2016 +0100 Committer: Sergey Beryozkin Committed: Tue Aug 2 14:29:50 2016 +0100 ---------------------------------------------------------------------- .../rs/security/oauth2/services/AbstractImplicitGrantService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/c2af9591/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractImplicitGrantService.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractImplicitGrantService.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractImplicitGrantService.java index 446f82c..0beae41 100644 --- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractImplicitGrantService.java +++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractImplicitGrantService.java @@ -139,7 +139,8 @@ public abstract class AbstractImplicitGrantService extends RedirectionBasedGrant protected void finalizeResponse(StringBuilder sb, OAuthRedirectionState state) { if (state.getState() != null) { sb.append("&"); - sb.append(OAuthConstants.STATE).append("=").append(state.getState()); + String stateParam = state.getState(); + sb.append(OAuthConstants.STATE).append("=").append(HttpUtils.urlEncode(stateParam)); } if (reportClientId) { sb.append("&").append(OAuthConstants.CLIENT_ID).append("=").append(state.getClientId());