]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
don't set an empty password or auth_user
authorStephen Bennett <redacted>
Fri, 29 Aug 2008 19:47:51 +0000 (14:47 -0500)
committerStephen Bennett <redacted>
Fri, 29 Aug 2008 19:47:51 +0000 (14:47 -0500)
modules/m_pass.c

index 0cc0747baeddcc2e86ec5a43047fbce767664b0d..b66de738fc7a9cd89248c99783abcf4ca9f9cf05 100644 (file)
@@ -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 */