Mercurial > pidgin
comparison libpurple/protocols/msnp9/nexus.c @ 22706:1e7713b5e068
UTF-8 friendly password truncation
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Wed, 23 Apr 2008 14:56:30 +0000 |
parents | 85fbff54425e |
children | 98bbeed2481c |
comparison
equal
deleted
inserted
replaced
22705:48abe30dc90a | 22706:1e7713b5e068 |
---|---|
335 msn_session_set_login_step(session, MSN_LOGIN_STEP_GET_COOKIE); | 335 msn_session_set_login_step(session, MSN_LOGIN_STEP_GET_COOKIE); |
336 | 336 |
337 username = | 337 username = |
338 g_strdup(purple_url_encode(purple_account_get_username(session->account))); | 338 g_strdup(purple_url_encode(purple_account_get_username(session->account))); |
339 | 339 |
340 password = g_strndup(purple_connection_get_password(session->account->gc), 16); | 340 password = g_utf8_strncpy(g_strdup(purple_connection_get_password(session->account->gc)), |
341 purple_connection_get_password(session->account->gc), 16); | |
341 encpass = g_strdup(purple_url_encode(password)); | 342 encpass = g_strdup(purple_url_encode(password)); |
342 g_free(password); | 343 g_free(password); |
343 | 344 |
344 ctint = strtoul((char *)g_hash_table_lookup(nexus->challenge_data, "ct"), NULL, 10) + 200; | 345 ctint = strtoul((char *)g_hash_table_lookup(nexus->challenge_data, "ct"), NULL, 10) + 200; |
345 | 346 |