# HG changeset patch # User John Bailey # Date 1242267160 0 # Node ID e4ab3d5362df5e2f4235809dba32ba2b6122f2a0 # Parent 37436c98201e5fa5e1e2877e9e2b36cb33a7b924 Only log requested HTTP URL's when PURPLE_UNSAFE_DEBUG is set and change MSN to use PURPLE_UNSAFE_DEBUG instead of PURPLE_MSN_UNSAFE_DEBUG for consistency. Not logging URL's will prevent potential password disclosure for the Yahoo HTTP login method. diff -r 37436c98201e -r e4ab3d5362df libpurple/protocols/msn/soap.c --- a/libpurple/protocols/msn/soap.c Wed May 13 18:42:52 2009 +0000 +++ b/libpurple/protocols/msn/soap.c Thu May 14 02:12:40 2009 +0000 @@ -80,7 +80,7 @@ conn->session = session; conn->host = g_strdup(host); conn->queue = g_queue_new(); - conn->unsafe_debug = g_getenv("PURPLE_MSN_UNSAFE_DEBUG") != NULL; + conn->unsafe_debug = g_getenv("PURPLE_UNSAFE_DEBUG") != NULL; return conn; } diff -r 37436c98201e -r e4ab3d5362df libpurple/util.c --- a/libpurple/util.c Wed May 13 18:42:52 2009 +0000 +++ b/libpurple/util.c Thu May 14 02:12:40 2009 +0000 @@ -3920,7 +3920,10 @@ } } - purple_debug_misc("util", "Request: '%s'\n", gfud->request); + if(g_getenv("PURPLE_UNSAFE_DEBUG")) + purple_debug_misc("util", "Request: '%s'\n", gfud->request); + else + purple_debug_misc("util", "request constructed\n"); total_len = strlen(gfud->request); @@ -4023,9 +4026,12 @@ g_return_val_if_fail(url != NULL, NULL); g_return_val_if_fail(callback != NULL, NULL); - purple_debug_info("util", - "requested to fetch (%s), full=%d, user_agent=(%s), http11=%d\n", - url, full, user_agent?user_agent:"(null)", http11); + if(g_getenv("PURPLE_UNSAFE_DEBUG")) + purple_debug_info("util", + "requested to fetch (%s), full=%d, user_agent=(%s), http11=%d\n", + url, full, user_agent?user_agent:"(null)", http11); + else + purple_debug_info("util", "requesting to fetch a URL\n"); gfud = g_new0(PurpleUtilFetchUrlData, 1);