Browse Source

Fixed ZF-3821 - CipherData element XPath queries did not register a namespace thus relying on a specific NS prefix typical of MS info cards but not other issuers.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24374 44c647ce-9c0f-0410-b52a-842ac1e357ba
padraic 14 years ago
parent
commit
e146d3e36d

+ 1 - 1
library/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php

@@ -52,7 +52,7 @@ class Zend_InfoCard_Xml_EncryptedData_XmlEnc extends Zend_InfoCard_Xml_Encrypted
         if(!($cipherdata instanceof Zend_InfoCard_Xml_Element)) {
             throw new Zend_InfoCard_Xml_Exception("Unable to find the enc:CipherData block");
         }
-
+        $cipherdata->registerXPathNamespace('enc', 'http://www.w3.org/2001/04/xmlenc#');
         list(,$ciphervalue) = $cipherdata->xpath("//enc:CipherValue");
 
         if(!($ciphervalue instanceof Zend_InfoCard_Xml_Element)) {

File diff suppressed because it is too large
+ 7 - 0
tests/Zend/InfoCard/XmlParsingTest.php


Some files were not shown because too many files changed in this diff