1
0
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:
8chan Admin 2013-10-23 10:28:47 +00:00
parent b997e2de56
commit 3c6641047f

View File

@ -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']);