Use FLAGS_SENTUSER instead of 'user' being non-empty to decide whether to register a user on CAP END.
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.
This commit is contained in:
parent
666de5311f
commit
1fb3b1e1c4
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue