Mercurial > pidgin
comparison src/protocols/msn/msn.c @ 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 | 9d839c9f6c2d |
comparison
equal
deleted
inserted
replaced
10068:f948913f3c33 | 10069:7cbe12859d3a |
---|---|
105 | 105 |
106 session = gc->proto_data; | 106 session = gc->proto_data; |
107 cmdproc = session->notification->cmdproc; | 107 cmdproc = session->notification->cmdproc; |
108 account = gaim_connection_get_account(gc); | 108 account = gaim_connection_get_account(gc); |
109 | 109 |
110 alias = (entry && *entry) ? entry : ""; | 110 if(entry && strlen(entry)) |
111 alias = gaim_url_encode(entry); | |
112 else | |
113 alias = ""; | |
111 | 114 |
112 if (strlen(alias) > BUDDY_ALIAS_MAXLEN) | 115 if (strlen(alias) > BUDDY_ALIAS_MAXLEN) |
113 { | 116 { |
114 gaim_notify_error(gc, NULL, | 117 gaim_notify_error(gc, NULL, |
115 _("Your new MSN friendly name is too long."), NULL); | 118 _("Your new MSN friendly name is too long."), NULL); |
116 return; | 119 return; |
117 } | 120 } |
118 | 121 |
119 msn_cmdproc_send(cmdproc, "REA", "%s %s", | 122 msn_cmdproc_send(cmdproc, "REA", "%s %s", |
120 gaim_account_get_username(account), | 123 gaim_account_get_username(account), |
121 gaim_url_encode(alias)); | 124 alias); |
122 } | 125 } |
123 | 126 |
124 static void | 127 static void |
125 msn_set_prp(GaimConnection *gc, const char *type, const char *entry) | 128 msn_set_prp(GaimConnection *gc, const char *type, const char *entry) |
126 { | 129 { |