auto-kick spammers not setting a postid

This commit is contained in:
Daniel Winzen
2020-11-08 21:23:29 +01:00
parent b45e18261f
commit 3abd5377b5

View File

@ -2926,6 +2926,9 @@ function validate_input() : string {
$maxmessage=get_setting('maxmessage');
$message=mb_substr($_POST['message'], 0, $maxmessage);
$rejected=mb_substr($_POST['message'], $maxmessage);
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='';
}elseif((time()-$U['lastpost'])<=1){ // time between posts too short, reject!