# HG changeset patch # User Ethan Blanton # Date 1301862082 0 # Node ID 1a248102e437faf0a5c09bbaf3f40727f1cfcac2 # Parent 0123005d0fb8879731d0dfa783abd60e655e8dd7 Send * as our local hostname for the USER message at signon. This value is ignored by most servers anyway, and could disclose location information for users connecting via Tor, through VPNs, or via other proxying systems. References #8322 diff -r 0123005d0fb8 -r 1a248102e437 libpurple/protocols/irc/irc.c --- a/libpurple/protocols/irc/irc.c Sat Apr 02 18:03:54 2011 +0000 +++ b/libpurple/protocols/irc/irc.c Sun Apr 03 20:21:22 2011 +0000 @@ -403,8 +403,7 @@ static gboolean do_login(PurpleConnection *gc) { char *buf, *tmp = NULL; - char *hostname, *server; - const char *hosttmp; + char *server; const char *username, *realname; struct irc_conn *irc = gc->proto_data; const char *pass = purple_connection_get_password(gc); @@ -432,17 +431,6 @@ } } - hosttmp = purple_get_host_name(); - if (*hosttmp == ':') { - /* This is either an IPv6 address, or something which - * doesn't belong here. Either way, we need to escape - * it. */ - hostname = g_strdup_printf("0%s", hosttmp); - } else { - /* Ugly, I know. */ - hostname = g_strdup(hosttmp); - } - if (*irc->server == ':') { /* Same as hostname, above. */ server = g_strdup_printf("0%s", irc->server); @@ -450,10 +438,9 @@ server = g_strdup(irc->server); } - buf = irc_format(irc, "vvvv:", "USER", tmp ? tmp : username, hostname, server, + buf = irc_format(irc, "vvvv:", "USER", tmp ? tmp : username, "*", server, strlen(realname) ? realname : IRC_DEFAULT_ALIAS); g_free(tmp); - g_free(hostname); g_free(server); if (irc_send(irc, buf) < 0) { g_free(buf);