From 57085fa9a76d72b3af854133659ca3732bad3cc2 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 2 Nov 2001 11:32:24 +0000 Subject: [PATCH] updates --- apps/silcd/command.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 59509fdd..d0cb5316 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -3035,7 +3035,8 @@ static void silc_server_command_join_channel(SilcServer server, username and/or hostname is in the ban list the access to the channel is denied. */ if (channel->ban_list) { - if (silc_string_match(channel->ban_list, check) || + if (!channel->ban_list || + silc_string_match(channel->ban_list, check) || silc_string_match(channel->ban_list, check2)) { silc_server_command_send_status_reply(cmd, SILC_COMMAND_JOIN, SILC_STATUS_ERR_BANNED_FROM_CHANNEL); @@ -3052,8 +3053,9 @@ static void silc_server_command_join_channel(SilcServer server, /* Check the channel passphrase if set. */ if (channel->mode & SILC_CHANNEL_MODE_PASSPHRASE) { - if (!passphrase || memcmp(channel->passphrase, passphrase, - strlen(channel->passphrase))) { + if (!passphrase || !channel->passphrase || + memcmp(channel->passphrase, passphrase, + strlen(channel->passphrase))) { silc_server_command_send_status_reply(cmd, SILC_COMMAND_JOIN, SILC_STATUS_ERR_BAD_PASSWORD); goto out; -- 2.24.0