summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-06-09 17:20:44 +0200
committerSimon Rettberg2016-06-09 17:20:44 +0200
commit40e6961473286ad149cc9c8068bc6b7f5912f578 (patch)
treec1c734f3ae3a99632d349e85ce2d76740ed4a3ad
parent[install] Add/refine more module's install scripts (diff)
downloadslx-admin-40e6961473286ad149cc9c8068bc6b7f5912f578.tar.gz
slx-admin-40e6961473286ad149cc9c8068bc6b7f5912f578.tar.xz
slx-admin-40e6961473286ad149cc9c8068bc6b7f5912f578.zip
[sysconfig/ssh] Default to port 22
-rw-r--r--modules-available/sysconfig/addmodule_sshconfig.inc.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules-available/sysconfig/addmodule_sshconfig.inc.php b/modules-available/sysconfig/addmodule_sshconfig.inc.php
index 79857085..19272c32 100644
--- a/modules-available/sysconfig/addmodule_sshconfig.inc.php
+++ b/modules-available/sysconfig/addmodule_sshconfig.inc.php
@@ -45,7 +45,11 @@ class SshConfig_Finish extends AddModule_Base
Util::redirect('?do=SysConfig&action=addmodule&step=SshConfig_Start');
}
$module->setData('allowPasswordLogin', Request::post('allowPasswordLogin') === 'yes');
- if (!$module->setData('listenPort', Request::post('listenPort'))) {
+ $port = Request::post('listenPort', '');
+ if ($port === '') {
+ $port = 22;
+ }
+ if (!$module->setData('listenPort', $port)) {
Message::addError('main.value-invalid', 'port', Request::post('listenPort'));
Util::redirect('?do=SysConfig&action=addmodule&step=SshConfig_Start');
}