Commit bd62b3eb authored by Ad Schellevis's avatar Ad Schellevis

(legacy) authgui.inc,/ (root) is /index.php, make sure we're matching the...

(legacy) authgui.inc,/ (root) is /index.php, make sure we're matching the correct item. https://github.com/opnsense/core/issues/724
parent daebae4f
......@@ -52,8 +52,9 @@ function cmp_page_matches($page, & $matches, $fullwc = true) {
/* look for a match */
foreach ($matches as $match) {
/* possibly ignore full wildcard match */
if (!$fullwc && !strcmp($match ,"*"))
if (!$fullwc && !strcmp($match ,"*")) {
continue;
}
/* compare exact or wildcard match */
$match = str_replace(array(".", "*","?"), array("\.", ".*","\?"), $match);
......@@ -87,6 +88,9 @@ function isAllowedPage($page)
}
}
}
if ($page == "/") {
$page = "/index.php";
}
/* user privelege access check */
$allowedpages = getAllowedPages($_SESSION['Username']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment