mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-01 23:06:38 +02:00
Fix crash if SASL is enabled and ping-cookie is disabled (neither are the
default). Reported by fbi (#4307).
This commit is contained in:
@@ -1023,7 +1023,7 @@ DLLFUNC CMD_FUNC(m_nick)
|
||||
}
|
||||
/* This had to be copied here to avoid problems.. */
|
||||
(void)strcpy(sptr->name, nick);
|
||||
if (sptr->user && IsNotSpoof(sptr) && !CHECKPROTO(sptr, PROTO_CLICAP))
|
||||
if (sptr->user && *sptr->user->username && IsNotSpoof(sptr) && !CHECKPROTO(sptr, PROTO_CLICAP))
|
||||
{
|
||||
/*
|
||||
** USER already received, now we have NICK.
|
||||
|
||||
@@ -164,7 +164,7 @@ Debug((DEBUG_NOTICE, "NOSPOOF"));
|
||||
sendto_one(sptr, ":IRC!IRC@%s PRIVMSG %s :\1VERSION\1",
|
||||
me.name, sptr->name);
|
||||
|
||||
if (sptr->user && sptr->name[0] && !CHECKPROTO(sptr, PROTO_CLICAP))
|
||||
if (sptr->user && *sptr->user->username && sptr->name[0] && !CHECKPROTO(sptr, PROTO_CLICAP))
|
||||
return register_user(cptr, sptr, sptr->name,
|
||||
sptr->user->username, NULL, NULL, NULL);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user