Make sure we still don't allow screen names of the form "1whatever"

Mon, 25 Jun 2007 08:48:04 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Mon, 25 Jun 2007 08:48:04 +0000
changeset 18343
13d96f8a0d7f
parent 18342
59204a3c8c11
child 18344
d897db3c5eea

Make sure we still don't allow screen names of the form "1whatever"

libpurple/protocols/oscar/util.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/oscar/util.c	Mon Jun 25 08:47:36 2007 +0000
+++ b/libpurple/protocols/oscar/util.c	Mon Jun 25 08:48:04 2007 +0000
@@ -151,6 +151,10 @@
 	if (purple_email_is_valid(sn))
 		return TRUE;
 
+	/* Normal AIM screen names can't start with a number */
+	if (isdigit(sn[0]))
+		return FALSE;
+
 	for (i = 0; sn[i] != '\0'; i++) {
 		if (!isalnum(sn[i]) && (sn[i] != ' ') &&
 			(sn[i] != '.') &&

mercurial