whois: check target is an oper before assuming they have a privset
The CHALLENGE functionality will set opername but not privset -- if an oper performs a WHOIS on someone currently half-way through a challenge we will perform a NULL dereference. Related to ircd-seven commit d7b05f7583babf6
This commit is contained in:
parent
5de892828f
commit
866026ab70
1 changed files with 1 additions and 1 deletions
|
@ -326,7 +326,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
|
||||||
GlobalSetOptions.operstring));
|
GlobalSetOptions.operstring));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(MyClient(target_p) && !EmptyString(target_p->localClient->opername) && IsOper(source_p))
|
if(MyClient(target_p) && !EmptyString(target_p->localClient->opername) && IsOper(target_p) && IsOper(source_p))
|
||||||
{
|
{
|
||||||
char buf[512];
|
char buf[512];
|
||||||
rb_snprintf(buf, sizeof(buf), "is opered as %s, privset %s",
|
rb_snprintf(buf, sizeof(buf), "is opered as %s, privset %s",
|
||||||
|
|
Loading…
Reference in a new issue