-
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?
-
lovetox
Both are wrong
-
lovetox
You don't escape the @ if it's the separator
-
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? ↺
-
Link Mauve
debacle, a localpart can’t contain a '@', ever.
-
Link Mauve
It goes against the stringprep profile.
-
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.
-
debacle
For context: The local part is a verified email address here.
-
lovetox
Its confusing, so you mean what you posted is the localpart
-
lovetox
Yes of course double \\ is wrong
-
lovetox
There is an example in the xep for escaping @
-
debacle
> Its confusing, so you mean what you posted is the localpart Yes! ↺
-
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. ↺