mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
allow to remove user/pass from quick_shell configuration
This commit is contained in:
parent
dc565d2575
commit
1a7165f751
@ -298,11 +298,25 @@ function quickShellSettings()
|
||||
ui_require_css_file('wizard');
|
||||
ui_require_css_file('discovery');
|
||||
|
||||
// Gotty settings. Internal communication (WS).
|
||||
if (isset($config['gotty_host']) === false) {
|
||||
config_update_value('gotty_host', '127.0.0.1');
|
||||
}
|
||||
|
||||
if (isset($config['gotty_telnet_port']) === false) {
|
||||
config_update_value('gotty_telnet_port', 8082);
|
||||
}
|
||||
|
||||
if (isset($config['gotty_ssh_port']) === false) {
|
||||
config_update_value('gotty_ssh_port', 8081);
|
||||
}
|
||||
|
||||
// Parser.
|
||||
if (get_parameter('qs_update', false) !== false) {
|
||||
// Gotty settings. Internal communication (WS).
|
||||
$gotty = get_parameter(
|
||||
'gotty',
|
||||
$config['gotty']
|
||||
''
|
||||
);
|
||||
$gotty_host = get_parameter(
|
||||
'gotty_host',
|
||||
@ -319,12 +333,12 @@ function quickShellSettings()
|
||||
|
||||
$gotty_user = get_parameter(
|
||||
'gotty_user',
|
||||
$config['gotty_user']
|
||||
''
|
||||
);
|
||||
|
||||
$gotty_pass = get_parameter(
|
||||
'gotty_pass',
|
||||
io_output_password($config['gotty_pass'])
|
||||
''
|
||||
);
|
||||
|
||||
$gotty_pass = io_input_password($gotty_pass);
|
||||
@ -359,10 +373,12 @@ function quickShellSettings()
|
||||
}
|
||||
|
||||
if ($config['gotty_pass'] != $gotty_pass) {
|
||||
$gotty_pass = io_input_password($gotty_pass);
|
||||
config_update_value('gotty_pass', $gotty_pass);
|
||||
$changes++;
|
||||
$critical++;
|
||||
}
|
||||
}
|
||||
|
||||
// Interface.
|
||||
ui_print_page_header(__('QuickShell settings'));
|
||||
@ -447,6 +463,13 @@ function quickShellSettings()
|
||||
'value' => io_output_password($config['gotty_pass']),
|
||||
],
|
||||
],
|
||||
[
|
||||
'arguments' => [
|
||||
'type' => 'hidden',
|
||||
'name' => 'qs_update',
|
||||
'value' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'arguments' => [
|
||||
'type' => 'submit',
|
||||
|
Loading…
x
Reference in New Issue
Block a user