diff libpurple/protocols/jabber/jabber.c @ 30929:b07841f6cd15

jabber: Print out plaintext-equivalent passwords when PURPLE_UNSAFE_DEBUG is set. Refs #a14565.
author Paul Aurich <paul@darkrain42.org>
date Sat, 20 Nov 2010 02:42:59 +0000
parents bc0bccdbc28f
children a8cc50c2279f
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Thu Nov 18 20:47:28 2010 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Sat Nov 20 02:42:59 2010 +0000
@@ -477,7 +477,7 @@
 		char *text = NULL, *last_part = NULL, *tag_start = NULL;
 
 		/* Because debug logs with plaintext passwords make me sad */
-		if(js->state != JABBER_STREAM_CONNECTED &&
+		if (!purple_debug_is_unsafe() && js->state != JABBER_STREAM_CONNECTED &&
 				/* Either <auth> or <query><password>... */
 				(((tag_start = strstr(data, "<auth ")) &&
 					strstr(data, "xmlns='" NS_XMPP_SASL "'")) ||