mirror of
https://github.com/osmarks/ngircd.git
synced 2025-06-23 16:54:08 +00:00
The server didn't validate weather the target user of a channel user mode
change is a valid channel member or not (from HEAD).
This commit is contained in:
parent
9810da343c
commit
90e6ec3f89
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: irc-mode.c,v 1.24.2.4 2003/01/17 19:08:57 alex Exp $";
|
static char UNUSED id[] = "$Id: irc-mode.c,v 1.24.2.5 2003/01/21 21:05:19 alex Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -507,6 +507,13 @@ Channel_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel )
|
|||||||
/* Is there a valid mode change? */
|
/* Is there a valid mode change? */
|
||||||
if( ! x[0] ) continue;
|
if( ! x[0] ) continue;
|
||||||
|
|
||||||
|
/* Validate target client */
|
||||||
|
if( client && ( ! Channel_IsMemberOf( Channel, client )))
|
||||||
|
{
|
||||||
|
if( ! IRC_WriteStrClient( Origin, ERR_USERNOTINCHANNEL_MSG, Client_ID( Origin ), Client_ID( client ), Channel_Name( Channel ))) break;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if( set )
|
if( set )
|
||||||
{
|
{
|
||||||
/* Set mode */
|
/* Set mode */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user