From 5f2df25109a42089316f2a62b6abbe2e83a15903 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 31 Jan 2010 01:40:43 +0100 Subject: [PATCH] Slightly tighten auth{} duplicate check: If the existing auth{} block has no auth_user, it will trump any auth{} block for the same u@h. --- src/newconf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/newconf.c b/src/newconf.c index 6afb2aca..3cf15c6d 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -913,8 +913,7 @@ conf_end_auth(struct TopConf *tc) if ((found_conf = find_exact_conf_by_address("*", CONF_CLIENT, "*")) && found_conf->spasswd == NULL) conf_report_error("Ignoring redundant auth block (after *@*)"); else if ((found_conf = find_exact_conf_by_address(yy_aconf->host, CONF_CLIENT, yy_aconf->user)) && - ( (!found_conf->spasswd && !yy_aconf->spasswd) || - (found_conf->spasswd && yy_aconf->spasswd && + (!found_conf->spasswd || (yy_aconf->spasswd && 0 == irccmp(found_conf->spasswd, yy_aconf->spasswd)))) conf_report_error("Ignoring duplicate auth block for %s@%s", yy_aconf->user, yy_aconf->host);