cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] cxf git commit: Some NPE fixes
Date Thu, 30 Jun 2016 12:48:10 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 9e63961bb -> 9c5b14dbc


Some NPE fixes


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/9c5b14db
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9c5b14db
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9c5b14db

Branch: refs/heads/master
Commit: 9c5b14dbc284cfccc3fa590fb729d9f11c91bc16
Parents: 9b13053
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Jun 30 13:47:51 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Jun 30 13:48:04 2016 +0100

----------------------------------------------------------------------
 .../apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java   | 4 ++++
 .../cxf/rs/security/oidc/rp/OidcClientCodeRequestFilter.java     | 3 +++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9c5b14db/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
index e00ce0b..3f42117 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
@@ -275,6 +275,10 @@ public final class OAuthClientUtils {
                                                    boolean setAuthorizationHeader) 
         throws OAuthServiceException {    
         
+        if (accessTokenService == null) {
+            throw new OAuthServiceException(OAuthConstants.SERVER_ERROR);
+        }
+        
         Form form = new Form(grant.toMap());
         if (extraParams != null) {
             for (Map.Entry<String, String> entry : extraParams.entrySet()) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/9c5b14db/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/OidcClientCodeRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/OidcClientCodeRequestFilter.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/OidcClientCodeRequestFilter.java
index 8f7cd84..015be15 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/OidcClientCodeRequestFilter.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/OidcClientCodeRequestFilter.java
@@ -72,6 +72,9 @@ public class OidcClientCodeRequestFilter extends ClientCodeRequestFilter
{
         }
         OidcClientTokenContextImpl ctx = new OidcClientTokenContextImpl();
         if (at != null) {
+            if (idTokenReader == null) {
+                throw new OAuthServiceException(OAuthConstants.SERVER_ERROR);
+            }
             IdToken idToken = idTokenReader.getIdToken(at, 
                                   requestParams.getFirst(OAuthConstants.AUTHORIZATION_CODE_VALUE),
                                   getConsumer());


Mime
View raw message