]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Use FLAGS_SENTUSER instead of 'user' being non-empty to decide whether to register...
authorStephen Bennett <redacted>
Tue, 23 Feb 2010 22:35:58 +0000 (22:35 +0000)
committerStephen Bennett <redacted>
Tue, 23 Feb 2010 22:35:58 +0000 (22:35 +0000)
identd and SASL can cause source_p->user to be present without USER having been sent.
Without this change, that could cause a crash later on as localClient->fullcaps is not initialised.

modules/m_cap.c

index 9fa94d37c9449e1446029bf534a74e19d961af05..94aebaca8eee25f3cf679088d28a127714b8de64 100644 (file)
@@ -319,7 +319,7 @@ cap_end(struct Client *source_p, const char *arg)
 
        source_p->flags &= ~FLAGS_CLICAP;
 
-       if(source_p->name[0] && source_p->user)
+       if(source_p->name[0] && source_p->flags & FLAGS_SENTUSER)
        {
                char buf[USERLEN+1];
                rb_strlcpy(buf, source_p->username, sizeof(buf));