forked from GithubBackups/vichan
Mod bug: non-mods of board could ban from board
This commit is contained in:
parent
7e65e1b971
commit
31ff4e044b
@ -840,7 +840,7 @@ function mod_page_ip($ip) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mod_ban() {
|
function mod_ban() {
|
||||||
global $config;
|
global $config, $mod;
|
||||||
|
|
||||||
if (!hasPermission($config['mod']['ban']))
|
if (!hasPermission($config['mod']['ban']))
|
||||||
error($config['error']['noaccess']);
|
error($config['error']['noaccess']);
|
||||||
@ -850,6 +850,9 @@ function mod_ban() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!in_array($_POST['board'], $mod['boards']))
|
||||||
|
error($config['error']['noaccess']);
|
||||||
|
|
||||||
require_once 'inc/mod/ban.php';
|
require_once 'inc/mod/ban.php';
|
||||||
|
|
||||||
Bans::new_ban($_POST['ip'], $_POST['reason'], $_POST['length'], $_POST['board'] == '*' ? false : $_POST['board']);
|
Bans::new_ban($_POST['ip'], $_POST['reason'], $_POST['length'], $_POST['board'] == '*' ? false : $_POST['board']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user