comparison libpurple/util.c @ 18615:0ad0bdb0063b

merge of '36ee98cd262baf7d57502c08fc185518ed93532a' and '4155ac2acf86fd3365a2f8ea18bd1cb4d1db4f0e'
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 22 Jul 2007 18:17:26 +0000
parents 321658bf0e03
children 450090c68351 4bd16a73769c
comparison
equal deleted inserted replaced
18585:823946ddd527 18615:0ad0bdb0063b
3992 } 3992 }
3993 if (*c == '@') break; 3993 if (*c == '@') break;
3994 if (*c <= ' ' || *c >= 127) return FALSE; 3994 if (*c <= ' ' || *c >= 127) return FALSE;
3995 if (strchr(rfc822_specials, *c)) return FALSE; 3995 if (strchr(rfc822_specials, *c)) return FALSE;
3996 } 3996 }
3997
3998 /* It's obviously not an email address if we didn't find an '@' above */
3999 if (*c == '\0') return FALSE;
4000
3997 /* strictly we should return false if (*(c - 1) == '.') too, but I think 4001 /* strictly we should return false if (*(c - 1) == '.') too, but I think
3998 * we should permit user.@domain type addresses - they do work :) */ 4002 * we should permit user.@domain type addresses - they do work :) */
3999 if (c == address) return FALSE; 4003 if (c == address) return FALSE;
4000 4004
4001 /* next we validate the domain portion (name@domain) (rfc1035 & rfc1011) */ 4005 /* next we validate the domain portion (name@domain) (rfc1035 & rfc1011) */