jaxl/JAXL

Prosody 0.10 does not allow client@server.com JID format

uncovery opened this issue · 1 comments

When you connect to prosody 0.10, you cannot use

$client = new JAXL(array(
        'jid' => 'username@server.com',
        'pass' => 'my_password',
    ));

You need to change it to this format:

$client = new JAXL(array(
        'jid' => 'username',
        'host' => 'server.com',
        'pass' => 'my_password',
    ));

the examples in the documentation should be updated accordingly.

FWIW, I was looking into the issue in the prosody MUC. This is what we saw. JAXL would send as "simple user name" (cf. RFC 6120, Section 6.3.7) the full bare JID instead of only the localpart. While this appears to have worked in the past, it doesn't anymore.

The root cause is

isset($this->jid) ? $this->jid->to_string() : null,
I think. There one should only pass the localpart of the JID instead of the full bare JID.

Given that JAXL probably cannot generally assume "deployment specific information" which allows to use the full bare JID as simple user name, this appears to be a violation of a SHOULD in RFC 6120:

However, in the absence of local information provided by the server,
an XMPP client SHOULD assume that the authentication identity for
such a SASL mechanism is a simple user name equal to the localpart of
the user's JID.

Disclaimer: I looked at the JAXL source code for like, maybe, 5 minutes or so; aside from that, I only looked at the debug trace @uncovery gave.