Browse Source

2006-01-30 Atsushi Enomoto <[email protected]>

	* XmlDsigEnvelopedSignatureTransform.cs :
	  It should not remove nodes in another XmlNodeList while its
	  iterator is in active use. This is exposed by the recent
	  XmlNodeList change.


svn path=/trunk/mcs/; revision=56250
Atsushi Eno 20 years ago
parent
commit
6fdeb62eef

+ 7 - 0
mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog

@@ -1,3 +1,10 @@
+2006-01-30  Atsushi Enomoto  <[email protected]>
+
+	* XmlDsigEnvelopedSignatureTransform.cs :
+	  It should not remove nodes in another XmlNodeList while its
+	  iterator is in active use. This is exposed by the recent
+	  XmlNodeList change.
+
 2005-09-27  Sebastien Pouliot  <[email protected]>
 
 	* KeyInfoX509Data.cs: Remove old 2.0 specific check.

+ 3 - 0
mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigEnvelopedSignatureTransform.cs

@@ -149,7 +149,10 @@ namespace System.Security.Cryptography.Xml {
 		{
 			if (remove) {
 				XmlNodeList nl = input.SelectNodes ("descendant-or-self::dsig:Signature", nsmgr);
+				ArrayList al = new ArrayList ();
 				foreach (XmlNode n in nl)
+					al.Add (n);
+				foreach (XmlNode n in al)
 					n.ParentNode.RemoveChild (n);
 			}
 			return input;