mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 09:34:39 +00:00
system: add/update valiation for #2340
This commit is contained in:
parent
394019e942
commit
ff60fe9cb3
@ -69,11 +69,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$input_errors = array();
|
||||
$pconfig = $_POST;
|
||||
|
||||
/* input validation */
|
||||
if (!empty($pconfig['webguiport'])) {
|
||||
if (!is_port($pconfig['webguiport'])) {
|
||||
$input_errors[] = gettext('You must specify a valid web GUI port number');
|
||||
}
|
||||
if (!empty($pconfig['webguiport']) && !is_port($pconfig['webguiport'])) {
|
||||
$input_errors[] = gettext('You must specify a valid web GUI port number.');
|
||||
}
|
||||
|
||||
if (empty($pconfig['webguiproto']) || !in_array($pconfig['webguiproto'], array('http', 'https'))) {
|
||||
$input_errors[] = gettext('You must specify a valid web GUI protocol.');
|
||||
}
|
||||
|
||||
if (!empty($pconfig['althostnames'])) {
|
||||
@ -85,10 +86,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($pconfig['sshport'])) {
|
||||
if (!is_port($pconfig['sshport'])) {
|
||||
$input_errors[] = gettext("You must specify a valid port number");
|
||||
}
|
||||
if (!empty($pconfig['sshport']) && !is_port($pconfig['sshport'])) {
|
||||
$input_errors[] = gettext('You must specify a valid SSH port number.');
|
||||
}
|
||||
|
||||
if (count($input_errors) == 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user