0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

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:
Stephen Bennett 2010-02-23 22:35:58 +00:00
parent 666de5311f
commit 1fb3b1e1c4

View 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));