changeset 10069:7cbe12859d3a

[gaim-migrate @ 11045] " msn_act_id() checks the length of the string it is passed to ensure that it is less than BUDDY_ALIAS_MAXLEN before attempting to send the command to the server. However, it checks the string before encoding it so if you pass a string that becomes longer than BUDDY_ALIAS_MAXLEN after encoding it then MSN will drop the connection when attempting to update your friendly name. Patch is for cvs head. I also have a patch for 1.0.0, if interested." --dbattams patch okayed by shx committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 29 Sep 2004 01:53:36 +0000
parents f948913f3c33
children 2b6bf836c6b9
files COPYRIGHT src/protocols/msn/msn.c
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Tue Sep 28 00:22:47 2004 +0000
+++ b/COPYRIGHT	Wed Sep 29 01:53:36 2004 +0000
@@ -8,6 +8,7 @@
 Paul Aurich
 Patrick Aussems
 Kevin Barry
+Derek Battams
 Curtis Beattie
 Dave Bell
 Brian Bernas
--- a/src/protocols/msn/msn.c	Tue Sep 28 00:22:47 2004 +0000
+++ b/src/protocols/msn/msn.c	Wed Sep 29 01:53:36 2004 +0000
@@ -107,7 +107,10 @@
 	cmdproc = session->notification->cmdproc;
 	account = gaim_connection_get_account(gc);
 
-	alias = (entry && *entry) ? entry : "";
+	if(entry && strlen(entry))
+		alias = gaim_url_encode(entry);
+	else
+		alias = "";
 
 	if (strlen(alias) > BUDDY_ALIAS_MAXLEN)
 	{
@@ -118,7 +121,7 @@
 
 	msn_cmdproc_send(cmdproc, "REA", "%s %s",
 					 gaim_account_get_username(account),
-					 gaim_url_encode(alias));
+					 alias);
 }
 
 static void