You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Scott Cantor (JIRA)" <ji...@apache.org> on 2011/05/07 23:50:03 UTC

[jira] [Resolved] (SANTUARIO-270) DSIGObject::load method crashes for ds:Object without Id attribute.

     [ https://issues.apache.org/jira/browse/SANTUARIO-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Cantor resolved SANTUARIO-270.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: C++ 1.6.0)

Fixed in svn. Unfortunate that Xerces would crash on those calls, that might be a bug there.

> DSIGObject::load method crashes for ds:Object without Id attribute.
> -------------------------------------------------------------------
>
>                 Key: SANTUARIO-270
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-270
>             Project: Santuario
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: C++ 1.6.0
>         Environment: Any
>            Reporter: Michal Bystrianin
>            Assignee: Scott Cantor
>              Labels: patch
>
> Bug in file DSIGObject.cpp: the "load" method crashes for ds:Object without Id attribute.
> For ds:Object element Id attribute is optional, see http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/.
> Solution: 2 lines (marked with //MB comment) must be inserted al below:
> 	mp_idAttr = ((DOMElement *) mp_objectNode)->getAttributeNodeNS(NULL, s_Id);
> 	if (mp_idAttr != NULL) {    //MB
> #if defined (XSEC_XERCES_HAS_SETIDATTRIBUTE)
> 		((DOMElement *) mp_objectNode)->setIdAttributeNS(NULL, s_Id);
> #else
> #  if defined (XSEC_XERCES_HAS_BOOLSETIDATTRIBUTE)
> 		((DOMElement *) mp_objectNode)->setIdAttributeNS(NULL, s_Id, true);
> #  endif
> #endif
> 	}   //MB
> 	mp_mimeTypeAttr = ((DOMElement *) mp_objectNode)->getAttributeNodeNS(NULL, s_MimeType);

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira