You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2013/09/30 11:36:24 UTC
[jira] [Updated] (SANTUARIO-368) NullPointerException in
XMLSecurity.java
[ https://issues.apache.org/jira/browse/SANTUARIO-368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colm O hEigeartaigh updated SANTUARIO-368:
------------------------------------------
Fix Version/s: Java 1.5.6
> NullPointerException in XMLSecurity.java
> ----------------------------------------
>
> Key: SANTUARIO-368
> URL: https://issues.apache.org/jira/browse/SANTUARIO-368
> Project: Santuario
> Issue Type: Bug
> Components: Java
> Affects Versions: Java 1.4.8, Java 1.5.5
> Reporter: Wally Dennis
> Assignee: Colm O hEigeartaigh
> Fix For: Java 1.5.6
>
>
> NullPointerException in XMLSecurity cconstructor if keyInfoElem does not contain a namespace:
> This code in the XMLSignature constructor:
> // If it exists use it, but it's not mandatory
> if (keyInfoElem != null
> && keyInfoElem.getNamespaceURI().equals(Constants.SignatureSpecNS)
> && keyInfoElem.getLocalName().equals(Constants._TAG_KEYINFO)) {
> this.keyInfo = new KeyInfo(keyInfoElem, baseURI);
> this.keyInfo.setSecureValidation(secureValidation);
> }
> should be done like this:
> // If it exists use it, but it's not mandatory
> if (keyInfoElem != null
> && Constants.SignatureSpecNS.equals(keyInfoElem.getNamespaceURI())
> && Constants._TAG_KEYINFO.equals(keyInfoElem.getLocalName())) {
> this.keyInfo = new KeyInfo(keyInfoElem, baseURI);
> this.keyInfo.setSecureValidation(secureValidation);
> }
> to prevent NullPointerExceptions if either the namespaceURI or localName member elements happen to be null.
--
This message was sent by Atlassian JIRA
(v6.1#6144)