Gateway returns malformed message stanzas on registration error

I am currently using XIFF to develop a custom xmpp application, running against Openfire with the IM Gateway plugins. As part of my unit testing, I am submitting known bogus credentials to the gateway in order to verify my error handling of this condition. However, it appears that the gateway is returning malformed stanzas containing the error.

The stanza that is returned is of type=“error” with the element containing the error message (see below for full dump of xml). According to the XMPP Core RFC (section 9.3 “Stanza Errors”), a stanza that is returned of type=“error” MUST contain an child element. In the case of a failed registration, the IM gateway does not appear to adhear to this requirement.

Additionally, as per the same section in the RFC:

"The receiving or processing entity that detects an error condition in relation to a stanza MUST return to the sending entity a stanza of the same kind (message, presence, or IQ), whose ‘type’ attribute is set to a value of “error” (such a stanza is called an “error stanza” herein)."

The gateway also appears to be violating this rule with respect to queries of type “jabber:iq:register”. The stanza that is being sent is of type whereas the error response is of type . There also seems to be a specious stanza sent immediately prior to the problematic stanza.

17:07:07.096 [INFO] OUTGOING:

bogus_account@yahoo.com

wrongpassword

**
17:07:11.270 [INFO] INCOMING: **

Yahoo! did not recognize the username you registered with. Please re-register with correct username.

The result of all of this is that the relevant handler in XIFF throws an exception when the type=“error” is encountered without the required child stanza.

NOTE: The example here is using the Yahoo! gateway but the error appears to hold true for all gateway protocols.

Anybody else seen anything similar?

You should use Kraken 1.0.0 and then report bugs on Kraken forums or file it in bug tracker at sf.net Kraken XMPP IM Gateway.

Will do. Thanks for the tip.

-Matt