jdev - 2026-01-03


  1. debacle

    Question about "XEP-0106: JID Escaping" and ejabber. When I `SELECT username FROM users;`, I see both `romeo\40montague.lit` and `juliet\\40capulet.lit`. I assume, that the former is correctly escaped and the latter consequence of a bug in our registration script. Or is it the other way around?

  2. lovetox

    Both are wrong

  3. lovetox

    You don't escape the @ if it's the separator

  4. debacle

    > You don't escape the @ if it's the separator Note, that the `@` is in the local part of the JID here. Imagine the complete JIDs to be `romeo@montague.lit@shakespeare.org` and `juliet@capulet.lit@shakespeare.org`. ejabberd does not save the domain part in the username column of the users table. So it should be `romeo@montague.lit` and `juliet@capulet.lit` in the database?

  5. Link Mauve

    debacle, a localpart can’t contain a '@', ever.

  6. Link Mauve

    It goes against the stringprep profile.

  7. debacle

    So it should be either `\40` or `\\40` then. But which one would be correct in ejabberd? I assume, it's the former one.

  8. debacle

    For context: The local part is a verified email address here.

  9. lovetox

    Its confusing, so you mean what you posted is the localpart

  10. lovetox

    Yes of course double \\ is wrong

  11. lovetox

    There is an example in the xep for escaping @

  12. debacle

    > Its confusing, so you mean what you posted is the localpart Yes!

  13. debacle

    > Yes of course double \\ is wrong OK! I wasn't sure, if the second backslash is maybe sth. ejabberd puts in or whatever. But then, I have other users with only one backslash, so that must be the correct one.