From fe79f7a75d455c6ebf49b5da9f4d6aa905d44294 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 16 Dec 2010 21:02:16 +0000 Subject: Hide password information during SASL auth in xmlconsole. --- protocols/jabber/io.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'protocols/jabber/io.c') diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c index d6f92a5f..9170f036 100644 --- a/protocols/jabber/io.c +++ b/protocols/jabber/io.c @@ -46,9 +46,16 @@ int jabber_write( struct im_connection *ic, char *buf, int len ) if( jd->flags & JFLAG_XMLCONSOLE ) { - char *msg; + char *msg, *s; msg = g_strdup_printf( "TX: %s", buf ); + /* Don't include auth info in XML logs. */ + if( strncmp( msg, "TX: ' ) ) ) + { + s++; + while( *s && *s != '<' ) + *(s++) = '*'; + } imcb_buddy_msg( ic, JABBER_XMLCONSOLE_HANDLE, msg, 0, 0 ); g_free( msg ); } -- cgit v1.2.3