Skip to content

Commit

Permalink
Fix: In Acces group the second select not working [ACL] (centreon#11695)
Browse files Browse the repository at this point in the history
* fix second select not working

* applying suggested changes
  • Loading branch information
hyahiaoui-ext authored Sep 7, 2022
1 parent 3231348 commit cbaffd5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions www/include/options/accessLists/groupsACL/groupsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ function sanitize_input_array(array $inputArray): array
$acl_group_id = filter_var($_GET['acl_group_id'] ?? $_POST['acl_group_id'] ?? null, FILTER_VALIDATE_INT) ?? null;

// Caution $o may already be set from the GET or from the POST.
$postO = filter_var($_POST['o1'] ?? $_POST['o2'] ?? $o ?? null, FILTER_SANITIZE_STRING);
$o = ("" !== $postO) ? $postO : null;
$postO = filter_var(
$_POST['o1'] ?? $_POST['o2'] ?? $o ?? null,
FILTER_VALIDATE_REGEXP,
["options" => ["regexp" => "/^(a|c|d|m|s|u|w)$/"]]
);
if ($postO !== false) {
$o = $postO;
}

switch ($o) {
case "a":
Expand Down

0 comments on commit cbaffd5

Please sign in to comment.