ejabberd icon indicating copy to clipboard operation
ejabberd copied to clipboard

MUC: Return better error on illegal nick changes

Open lovetox opened this issue 5 months ago • 3 comments

Environment

  • ejabberd version: 24.7

Errors from error.log/crash.log

<presence xmlns="jabber:client" id="2e61e2e0-b181-45a8-bca1-fa8b70803ffb" from="[email protected]/lovetox2🔫" type="error">
  <c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="https://gajim.org" ver="oHb81TBTQlH4TRHlgbyUyVWVAIo=" />
  <error type="modify">
    <bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
    <text xml:lang="en" xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Bad value of attribute 'to' in tag &lt;presence/&gt; qualified by namespace 'jabber:client'</text>
</error>
</presence>

Bug description

the <text> element should give a error message that the client can show to the user. This error will not be useful to the average user.

You could argue that the client should validate the resource before sending it, and in fact the client here in question does it. The problem is that with precis and stringprep, two conflicting standards are in use, and the client cannot find out what the server supports.

lovetox avatar Sep 11 '24 18:09 lovetox