You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2016/05/23 16:28:31 UTC
[2/2] cxf git commit: NPE fix
NPE fix
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/194f9cd9
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/194f9cd9
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/194f9cd9
Branch: refs/heads/3.1.x-fixes
Commit: 194f9cd98da50140e8184ff4835811875aa5ecfe
Parents: f26c82e
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Mon May 23 17:11:33 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon May 23 17:27:25 2016 +0100
----------------------------------------------------------------------
.../rs/security/oauth2/client/MemoryClientCodeStateManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/194f9cd9/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/MemoryClientCodeStateManager.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/MemoryClientCodeStateManager.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/MemoryClientCodeStateManager.java
index 33a95df..90b9e5c 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/MemoryClientCodeStateManager.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/MemoryClientCodeStateManager.java
@@ -56,7 +56,7 @@ public class MemoryClientCodeStateManager implements ClientCodeStateManager {
MultivaluedMap<String, String> redirectState) {
String stateParam = redirectState.getFirst(OAuthConstants.STATE);
String sessionToken = OAuthUtils.getSessionToken(mc, "state");
- if (!sessionToken.equals(stateParam)) {
+ if (sessionToken == null || !sessionToken.equals(stateParam)) {
throw new OAuthServiceException("Invalid session token");
}
return map.remove(stateParam);