From 1d53b4283b109ad1fb261a6f25fe20abac016cb6 Mon Sep 17 00:00:00 2001 From: Stephen Bennett Date: Fri, 29 Aug 2008 14:47:51 -0500 Subject: [PATCH] don't set an empty password or auth_user --- modules/m_pass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/m_pass.c b/modules/m_pass.c index 0cc0747..b66de73 100644 --- a/modules/m_pass.c +++ b/modules/m_pass.c @@ -83,9 +83,9 @@ mr_pass(struct Client *client_p, struct Client *source_p, int parc, const char * auth_user = NULL; } - client_p->localClient->passwd = rb_strndup(pass, PASSWDLEN); + client_p->localClient->passwd = *pass ? rb_strndup(pass, PASSWDLEN) : NULL; - if(auth_user) + if(auth_user && *auth_user) client_p->localClient->auth_user = rb_strndup(auth_user, PASSWDLEN); /* These are for servers only */