Mercurial > pidgin
comparison libpurple/protocols/jabber/jutil.c @ 27464:da3d0159333d
XMPP domains can also be IPv4 or IPv6 addresses
We don't have an IPv6 validation function and I didn't feel
like writing one, so I left those checks commented out and
added a note to jabber_nameprep_validate (which is
increasingly misnamed).
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 11 Jul 2009 01:57:14 +0000 |
parents | 167d7c3a4f7b |
children | e90fa379fcec |
comparison
equal
deleted
inserted
replaced
27463:167d7c3a4f7b | 27464:da3d0159333d |
---|---|
63 | 63 |
64 if(strlen(str) > 1023) | 64 if(strlen(str) > 1023) |
65 return FALSE; | 65 return FALSE; |
66 | 66 |
67 /* | 67 /* |
68 * This should be more similar to purple_email_is_valid(). Maybe | 68 * TODO: An IPv6 address of the form [2001:470:1f05:d58::2] is also |
69 * that function should even be split up and we should call the part | 69 * a valid XMPP domain portion. |
70 * that validates the domain name. | |
71 */ | 70 */ |
72 c = str; | 71 c = str; |
73 while(c && *c) { | 72 while(c && *c) { |
74 gunichar ch = g_utf8_get_char(c); | 73 gunichar ch = g_utf8_get_char(c); |
75 /* The list of characters allowed in domain names is pretty small */ | 74 /* The list of characters allowed in domain names is pretty small */ |