add otp security check to critical settings

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-07-10 13:40:48 +02:00
parent 03b5a921ff
commit f396bd5184
20 changed files with 235 additions and 35 deletions

View File

@@ -44,7 +44,8 @@ return [
'type' => 'text',
'maxlength' => 255,
'value' => 'service php7.4-fpm restart',
'mandatory' => true
'mandatory' => true,
'required_otp' => true
],
'config_dir' => [
'label' => lng('serversettings.phpfpm_settings.configdir'),

View File

@@ -45,7 +45,8 @@ return [
'type' => 'text',
'maxlength' => 255,
'value' => $result['reload_cmd'],
'mandatory' => true
'mandatory' => true,
'required_otp' => true
],
'config_dir' => [
'label' => lng('serversettings.phpfpm_settings.configdir'),

View File

@@ -46,7 +46,8 @@ return [
'label' => lng('admin.phpsettings.binary'),
'type' => 'text',
'maxlength' => 255,
'value' => '/usr/bin/php-cgi'
'value' => '/usr/bin/php-cgi',
'required_otp' => true
],
'fpmconfig' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
@@ -61,7 +62,8 @@ return [
'desc' => lng('admin.phpsettings.file_extensions_note'),
'type' => 'text',
'maxlength' => 255,
'value' => 'php'
'value' => 'php',
'required_otp' => true
],
'mod_fcgid_starter' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
@@ -181,7 +183,8 @@ return [
'cols' => 80,
'rows' => 20,
'value' => $result['phpsettings'],
'mandatory' => true
'mandatory' => true,
'required_otp' => true
],
'allow_all_customers' => [
'label' => lng('serversettings.phpfpm_settings.allow_all_customers.title'),

View File

@@ -47,7 +47,8 @@ return [
'label' => lng('admin.phpsettings.binary'),
'type' => 'text',
'maxlength' => 255,
'value' => $result['binary']
'value' => $result['binary'],
'required_otp' => true
],
'fpmconfig' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
@@ -62,7 +63,8 @@ return [
'desc' => lng('admin.phpsettings.file_extensions_note'),
'type' => 'text',
'maxlength' => 255,
'value' => $result['file_extensions']
'value' => $result['file_extensions'],
'required_otp' => true
],
'mod_fcgid_starter' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
@@ -185,7 +187,8 @@ return [
'cols' => 80,
'rows' => 20,
'value' => $result['phpsettings'],
'mandatory' => true
'mandatory' => true,
'required_otp' => true
],
'allow_all_customers' => [
'label' => lng('serversettings.phpfpm_settings.allow_all_customers.title'),