1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-17 11:28:41 +01:00

[SECURITY] [REGRESSION] Fix config editor UI

Closes #516.

Co-Authored-By: Scotty Molt <smolt@asu.edu>
This commit is contained in:
Fred Brennan 2022-12-10 10:27:59 -05:00
parent cd444a1c1b
commit 191dbd3be0

View File

@ -2444,7 +2444,7 @@ function mod_config($board_config = false) {
if (!hasPermission($config['mod']['edit_config'], $board_config))
error($config['error']['noaccess']);
$config_file = $board_config ? $board['dir'] . 'config.php' : 'inc/instance-config.php';
$config_file = $board_config ? $board['dir'] . 'config.php' : 'inc/secrets.php';
if ($config['mod']['config_editor_php']) {
$readonly = !(is_file($config_file) ? is_writable($config_file) : is_writable(dirname($config_file)));