From 23a8f750f7f57b4451535580bed0d78c8dbf9a7a Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 8 May 2009 01:50:35 +0200 Subject: [PATCH] Disallow double quotes in klines. These could cause parse problems with kline.conf. --- modules/m_kline.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/m_kline.c b/modules/m_kline.c index 5bcfa70f..5407d4c5 100644 --- a/modules/m_kline.c +++ b/modules/m_kline.c @@ -588,8 +588,9 @@ find_user_host(struct Client *source_p, const char *userhost, char *luser, char static int valid_user_host(struct Client *source_p, const char *luser, const char *lhost) { - /* # is invalid, as are '!' (n!u@h kline) and '@' (u@@h kline) */ - if(strchr(lhost, '#') || strchr(luser, '#') || strchr(luser, '!') || + /* # and " are invalid, as are '!' (n!u@h kline) and '@' (u@@h kline) */ + if(strchr(lhost, '#') || strchr(luser, '#') || strchr(lhost, '"') || + strchr(luser, '"') || strchr(luser, '!') || strchr(lhost, '@')) { sendto_one_notice(source_p, ":Invalid K-Line");