irssi-import / bugs.irssi.org

bugs.irssi.org archive
https://github.com/irssi/irssi/issues
0 stars 0 forks source link

usermode is never NULL #919

Closed irssibot closed 8 years ago

irssibot commented 10 years ago

irssi sends MODE %s %s to server even if usermode = ""; in config. This could lead to nickname or activity exposure if irssi used behind bouncer.

quickfix attached

irssibot commented 10 years ago

usermode.patch

diff -rupN irssi-0.8.16-rc1/src/irc/core/irc-servers.c irssi-0.8.16-rc1-new/src/irc/core/irc-servers.c
--- irssi-0.8.16-rc1/src/irc/core/irc-servers.c 2014-05-20 09:11:28.330063178 +0400
+++ irssi-0.8.16-rc1-new/src/irc/core/irc-servers.c 2014-05-20 09:54:29.032831188 +0400
@@ -552,7 +552,7 @@ static void event_connected(IRC_SERVER_R
    g_get_current_time(&now);
    memcpy(&server->wait_cmd, &now, sizeof(GTimeVal));

-   if (server->connrec->usermode != NULL) {
+   if (strcmp(server->connrec->usermode,"") != 0) {
        /* Send the user mode, before the autosendcmd.
         * Do not pass this through cmd_mode because it
         * is not known whether the resulting MODE message
irssibot commented 8 years ago

See https://github.com/irssi/irssi/pull/315