[JDEV] JID Validation using REGEX
Peter Saint-Andre
stpeter at jabber.org
Tue Jul 15 07:36:22 CDT 2003
On Tue, Jul 15, 2003 at 10:10:25AM +0200, Jacek Konieczny wrote:
> On Mon, Jul 14, 2003 at 08:55:20PM -0700, Chris Mullins wrote:
> > Has anyone come up with a RegEx expression to validate a JID?
>
> It would be veeery large regexp. If it is possible at all.
> stringprep should be used to preapare and validate JID,
> and the procedure described in stringprep includes:
>
> - Unicode normalization
> - case folding
> - character mapping
> - checking for forbidden and unassigned characters
Jacek, you are right that JID processing in accordance with the XMPP
specifications requires stringprep processing. However, there is no
explicit requirement that client software must ensure conformance with
the specification (it could be handled at the server side, although we
need to make that more explicit in the drafts). And before the XMPP
specs, the only documentation was JEP-0029, which did not specify the
use of stringprep.
Chris, you probably already know this, but the relevant documents are:
http://www.jabber.org/ietf/draft-ietf-xmpp-core-15.html (section 3)
http://www.jabber.org/ietf/draft-ietf-xmpp-nodeprep-03.html
http://www.jabber.org/ietf/draft-ietf-xmpp-resourceprep-03.html
http://www.jabber.org/jeps/jep-0029.html
Peter
More information about the JDev
mailing list