mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
(legacy) system_authservers.php, empty server name not allowed. closes https://github.com/opnsense/core/issues/731
This commit is contained in:
parent
0866361852
commit
832cd12f23
@ -179,6 +179,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
if (($pconfig['type'] == "radius") && isset($pconfig['radius_timeout']) && !empty($pconfig['radius_timeout']) && (!is_numeric($pconfig['radius_timeout']) || (is_numeric($pconfig['radius_timeout']) && ($pconfig['radius_timeout'] <= 0)))) {
|
||||
$input_errors[] = gettext("RADIUS Timeout value must be numeric and positive.");
|
||||
}
|
||||
if (empty($pconfig['name'])) {
|
||||
$input_errors[] = gettext("A server name must be provided");
|
||||
}
|
||||
|
||||
if (count($input_errors) == 0) {
|
||||
$server = array();
|
||||
$server['refid'] = uniqid();
|
||||
@ -442,11 +446,13 @@ endif; ?>
|
||||
<td>
|
||||
<?php if (!isset($id)) :
|
||||
?>
|
||||
<select name='type' id='type' class="formselect selectpicker" data-style="btn-default">
|
||||
<select name='type' id='type' class="selectpicker" data-style="btn-default">
|
||||
<?php
|
||||
foreach ($auth_server_types as $typename => $typedesc) :
|
||||
?>
|
||||
<option value="<?=$typename;?>"><?=$typedesc;?></option>
|
||||
<option value="<?=$typename;?>" <?=$pconfig['type'] == $typename ? "selected=\"selected\"" : "";?> >
|
||||
<?=$typedesc;?>
|
||||
</option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user