Summary | Detailed validation of JID |
Queue | gloox |
Queue Version | 1.0.22 |
Type | Enhancement |
State | Unconfirmed |
Priority | 1. Low |
Owners | js (at) camaya (dot) net |
Requester | pulkomandy (at) pulkomandy (dot) tk |
Created | 07/13/2019 (1610 days ago) |
Due | |
Updated | 12/08/2019 (1462 days ago) |
Assigned | |
Resolved |
Assigned to Jakob Schröter
I looked into this (a while ago) and there doesn't seem to be a way to
do such validation with libidn. If any other prep-lib is capable of
doing it, gloox would need to be ported there.
State ⇒ Unconfirmed
Queue ⇒ gloox
Summary ⇒ Detailed validation of JID
Type ⇒ Enhancement
Priority ⇒ 1. Low
precise feedback to users when their JID is invald or may be modified
by the string prep algorithms. Currently I can only check if the JID
is valid using the bool cast operator, and maybe check if the string
representation is identical to what I passed to the constructor.
I would like to know:
- If the string is really not looking like a JID (for example, no @)
- If the username is too long (I think the limit is 1023 characters)
- If there are unprintable characters, spaces or control characters in it
- If a reserved character is used (my current code checks for :@<>'"&
but I don't know if that's appropriate)
Could gloox provide somthing of that level of detail when validating a JID?