ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1102731 - /webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java
Date Fri, 13 May 2011 13:43:54 GMT
Author: coheigea
Date: Fri May 13 13:43:54 2011
New Revision: 1102731

URL: http://svn.apache.org/viewvc?rev=1102731&view=rev
Log:
NPE guard.

Modified:
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java?rev=1102731&r1=1102730&r2=1102731&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java Fri May
13 13:43:54 2011
@@ -100,6 +100,12 @@ public class SAMLUtil {
                     strElement.getOwnerDocument(), wsDocInfo,
                     request.getCallbackHandler(), keyIdentifierValue, type
                 );
+            
+            if (token == null) {
+                throw new WSSecurityException(
+                    WSSecurityException.FAILURE, "invalidSAMLsecurity"
+                );
+            }
             Processor proc = request.getWssConfig().getProcessor(WSSecurityEngine.SAML_TOKEN);
             List<WSSecurityEngineResult> samlResult =
                 proc.handleToken(token, request, wsDocInfo);



Mime
View raw message