Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F3BB8DC7F for ; Thu, 20 Sep 2012 14:28:11 +0000 (UTC) Received: (qmail 13844 invoked by uid 500); 20 Sep 2012 14:28:11 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 13749 invoked by uid 500); 20 Sep 2012 14:28:11 -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 13742 invoked by uid 99); 20 Sep 2012 14:28:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Sep 2012 14:28:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Sep 2012 14:28:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1B7922388900; Thu, 20 Sep 2012 14:27:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1388043 - /cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java Date: Thu, 20 Sep 2012 14:27:25 -0000 To: commits@cxf.apache.org From: coheigea@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120920142725.1B7922388900@eris.apache.org> Author: coheigea Date: Thu Sep 20 14:27:24 2012 New Revision: 1388043 URL: http://svn.apache.org/viewvc?rev=1388043&view=rev Log: [FEDIZ-26] - SAMLTokenValidator throws a NPE when an Attribute of the Assertion does not have a NameFormat. Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java?rev=1388043&r1=1388042&r2=1388043&view=diff ============================================================================== --- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java (original) +++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java Thu Sep 20 14:27:24 2012 @@ -320,7 +320,7 @@ public class SAMLTokenValidator implemen // if NameFormat is http://schemas.xmlsoap.org/ws/2005/05/identity/claims // but ClaimType value must be fully qualified as Namespace attribute goes away URI attrName = URI.create(attribute.getName()); - if (attribute.getNameFormat().equals(ClaimTypes.URI_BASE.toString()) + if (ClaimTypes.URI_BASE.toString().equals(attribute.getNameFormat()) && !attrName.isAbsolute()) { c.setClaimType(URI.create(ClaimTypes.URI_BASE + "/" + attribute.getName())); } else {