Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/notification.c @ 23731:59f8890ae8cf
Fix up the MSN Inbox URL. There was a typo that caused a use-after-free
and also needed to escape the auth key because now it includes slashes
and equals-signs, etc.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Thu, 07 Aug 2008 05:06:49 +0000 |
parents | 7f4b697c6947 |
children | 4ca41efb75a7 |
comparison
equal
deleted
inserted
replaced
23730:5aba1f0f36b0 | 23731:59f8890ae8cf |
---|---|
1286 PurpleConnection *gc; | 1286 PurpleConnection *gc; |
1287 PurpleAccount *account; | 1287 PurpleAccount *account; |
1288 const char *rru; | 1288 const char *rru; |
1289 const char *url; | 1289 const char *url; |
1290 PurpleCipherContext *cipher; | 1290 PurpleCipherContext *cipher; |
1291 gchar digest[33]; | 1291 gchar creds[33]; |
1292 char *buf; | 1292 char *buf; |
1293 | 1293 |
1294 gulong tmp_timestamp; | 1294 gulong tmp_timestamp; |
1295 | 1295 |
1296 session = cmdproc->session; | 1296 session = cmdproc->session; |
1308 tmp_timestamp, | 1308 tmp_timestamp, |
1309 purple_connection_get_password(gc)); | 1309 purple_connection_get_password(gc)); |
1310 | 1310 |
1311 cipher = purple_cipher_context_new_by_name("md5", NULL); | 1311 cipher = purple_cipher_context_new_by_name("md5", NULL); |
1312 purple_cipher_context_append(cipher, (const guchar *)buf, strlen(buf)); | 1312 purple_cipher_context_append(cipher, (const guchar *)buf, strlen(buf)); |
1313 purple_cipher_context_digest_to_str(cipher, sizeof(digest), digest, NULL); | 1313 purple_cipher_context_digest_to_str(cipher, sizeof(creds), creds, NULL); |
1314 purple_cipher_context_destroy(cipher); | 1314 purple_cipher_context_destroy(cipher); |
1315 | 1315 |
1316 g_free(buf); | 1316 g_free(buf); |
1317 | 1317 |
1318 g_free(session->passport_info.mail_url); | 1318 g_free(session->passport_info.mail_url); |
1319 session->passport_info.mail_url = g_strdup_printf("%s&auth=%s&creds=%s&sl=%ld&username=%s&mode=ttl&sid=%s&id=2&rru=%ssvc_mail&js=yes", | 1319 session->passport_info.mail_url = g_strdup_printf("%s&auth=%s&creds=%s&sl=%ld&username=%s&mode=ttl&sid=%s&id=2&rru=%s&svc=mail&js=yes", |
1320 url, | 1320 url, |
1321 session->passport_info.mspauth ? session->passport_info.mspauth : "BOGUS", | 1321 session->passport_info.mspauth ? purple_url_encode(session->passport_info.mspauth) : "BOGUS", |
1322 buf, | 1322 creds, |
1323 tmp_timestamp, | 1323 tmp_timestamp, |
1324 msn_user_get_passport(session->user), | 1324 msn_user_get_passport(session->user), |
1325 session->passport_info.sid, | 1325 session->passport_info.sid, |
1326 rru); | 1326 rru); |
1327 | 1327 |