auto-kick spammers not setting a postid
This commit is contained in:
7
chat.php
7
chat.php
@ -2926,9 +2926,12 @@ function validate_input() : string {
|
|||||||
$maxmessage=get_setting('maxmessage');
|
$maxmessage=get_setting('maxmessage');
|
||||||
$message=mb_substr($_POST['message'], 0, $maxmessage);
|
$message=mb_substr($_POST['message'], 0, $maxmessage);
|
||||||
$rejected=mb_substr($_POST['message'], $maxmessage);
|
$rejected=mb_substr($_POST['message'], $maxmessage);
|
||||||
if($U['postid']===$_POST['postid']){// ignore double post=reload from browser or proxy
|
if(!isset($_POST['postid'])){ // auto-kick spammers not setting a postid
|
||||||
|
kick_chatter([$U['nickname']], '', false);
|
||||||
|
}
|
||||||
|
if($U['postid']===$_POST['postid']){ // ignore double post=reload from browser or proxy
|
||||||
$message='';
|
$message='';
|
||||||
}elseif((time()-$U['lastpost'])<=1){// time between posts too short, reject!
|
}elseif((time()-$U['lastpost'])<=1){ // time between posts too short, reject!
|
||||||
$rejected=$_POST['message'];
|
$rejected=$_POST['message'];
|
||||||
$message='';
|
$message='';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user