mirror of
https://github.com/osmarks/ngircd.git
synced 2025-02-15 16:50:02 +00:00
Don't allow SQUERY to send to "target masks" and channels; only services!
This commit is contained in:
parent
3913de3cff
commit
3afa0e0658
@ -454,13 +454,15 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
|||||||
Req->command, Client_ID(cl),
|
Req->command, Client_ID(cl),
|
||||||
Req->argv[1]))
|
Req->argv[1]))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
} else if (strchr("$#", currentTarget[0])
|
} else if (ForceType != CLIENT_SERVICE
|
||||||
|
&& strchr("$#", currentTarget[0])
|
||||||
&& strchr(currentTarget, '.')) {
|
&& strchr(currentTarget, '.')) {
|
||||||
/* targetmask */
|
/* targetmask */
|
||||||
if (!Send_Message_Mask(from, Req->command, currentTarget,
|
if (!Send_Message_Mask(from, Req->command, currentTarget,
|
||||||
Req->argv[1], SendErrors))
|
Req->argv[1], SendErrors))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
} else if ((chan = Channel_Search(currentTarget))) {
|
} else if (ForceType != CLIENT_SERVICE
|
||||||
|
&& (chan = Channel_Search(currentTarget))) {
|
||||||
/* channel */
|
/* channel */
|
||||||
if (!Channel_Write(chan, from, Client, Req->command,
|
if (!Channel_Write(chan, from, Client, Req->command,
|
||||||
SendErrors, Req->argv[1]))
|
SendErrors, Req->argv[1]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user