changeset 32471:307d487f21ee

Allow signing on with usernames containing periods and underscores. Allow adding buddies containing periods and underscores. Fixes #13500.
author Mark Doliner <mark@kingant.net>
date Mon, 09 Jan 2012 10:58:37 +0000
parents 1874e96cf513
children 4db23cc97da4
files ChangeLog libpurple/protocols/oscar/util.c
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jan 06 02:37:42 2012 +0000
+++ b/ChangeLog	Mon Jan 09 10:58:37 2012 +0000
@@ -6,9 +6,12 @@
 	  (Dan Williams) (#13859)
 
 	AIM and ICQ:
-	* Make buddy list management code more efficient. (Oliver) (#4816)
+	* Allow signing on with usernames containing periods and
+	  underscores. (#13500)
+	* Allow adding buddies containing periods and underscores. (#13500)
 	* Don't try to format ICQ usernames entered as email addresses.
 	  Gets rid of an "Unable to format username" error at login. (#13883)
+	* Make buddy list management code more efficient. (Oliver) (#4816)
 
 	Bonjour:
 	* Support file transfers up to ~9 EiB.
--- a/libpurple/protocols/oscar/util.c	Fri Jan 06 02:37:42 2012 +0000
+++ b/libpurple/protocols/oscar/util.c	Mon Jan 09 10:58:37 2012 +0000
@@ -141,12 +141,12 @@
 	if (purple_email_is_valid(name))
 		return TRUE;
 
-	/* Normal AIM usernames can't start with a number */
-	if (isdigit(name[0]))
+	/* Normal AIM usernames can't start with a number, period or underscore */
+	if (isalnum(name[0]))
 		return FALSE;
 
 	for (i = 0; name[i] != '\0'; i++) {
-		if (!isalnum(name[i]) && (name[i] != ' '))
+		if (!isalnum(name[i]) && name[i] != ' ' && name[i] != '.' && name[i] != '_')
 			return FALSE;
 	}