mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-18 09:04:44 +01:00
Mod bug: non-mods of board could ban from board
This commit is contained in:
parent
b997e2de56
commit
3c6641047f
@ -840,7 +840,7 @@ function mod_page_ip($ip) {
|
||||
}
|
||||
|
||||
function mod_ban() {
|
||||
global $config;
|
||||
global $config, $mod;
|
||||
|
||||
if (!hasPermission($config['mod']['ban']))
|
||||
error($config['error']['noaccess']);
|
||||
@ -850,6 +850,9 @@ function mod_ban() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!in_array($_POST['board'], $mod['boards']))
|
||||
error($config['error']['noaccess']);
|
||||
|
||||
require_once 'inc/mod/ban.php';
|
||||
|
||||
Bans::new_ban($_POST['ip'], $_POST['reason'], $_POST['length'], $_POST['board'] == '*' ? false : $_POST['board']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user