Fixed
Details
Details
Assignee
Juga Paazmaya
Juga PaazmayaReporter
Sean Voisen
Sean VoisenComponents
Fix versions
Affects versions
Priority
Created December 17, 2006 at 10:19 AM
Updated October 28, 2020 at 8:51 AM
Resolved August 2, 2012 at 10:04 PM
This patch fixes an issue in the recognition of extension handlers. The old code assumed that the namespace for the given extension would always be handled by the xmlns attribute of the root element. However, you are not guarunteed that the namespace attribute will not be prefixed by some servers and clients. The more reliable way in to rely on the Actionscript XML API to get the namespace.
— C:/Documents and Settings/rn996/workspace/xiff_as3_flexlib_beta1/src/org/jivesoftware/xiff/data/XMPPStanza.as (revision 5480)
+++ C:/Documents and Settings/rn996/workspace/xiff_as3_flexlib_beta1/src/org/jivesoftware/xiff/data/XMPPStanza.as (working copy)
@@ -141,8 +141,12 @@
{
var nName:String = children[i].nodeName;
- var nNamespace:String = children[i].attributes.xmlns;
+ // Namespace handling should be done by using AS2's XML api.
+ // Assuming XML attribute names will break against servers that
+ // prefix namespaces in the generated XML.
+ var nNamespace:String = XMLNode(children[i]).namespaceURI;
+
nNamespace = exists( nNamespace ) ? nNamespace : CLIENT_NS;
if( nName == "error" ) {
Message was edited by: RyanNorris