Question

using sasl plain in xmpp

from server (sasl negotiation)

<stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism></mechanisms><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='TQ2JFyRoSa70h2G1bpgjzuXb2sU='/><register xmlns='http://jabber.org/features/iq-register'/></stream:features>

sent from client

<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGlnZW55YXIAMTIzNDU2Nzg=</auth>

where the crappy thing in between is base64-encoded of "\0login\0password"

respond from server

<stream:error><xml-not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error>

Any reason? Thanks.

Was it helpful?

Solution

The First entry has an extra Closing "mechanisms" tag after the SCRAM-SHA-1 Item.

OTHER TIPS

As others have pointed out: The XML looks well formated. I guess you need to rethink your problem. It's not "Why is the XML not well formated", but "Why does the server reply with xml-not-well-formated when it sees this stanza?"

And in order to answer this question you (nobody else can do it for you) should debug the server implementation and find out what's causing it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top