(legacy) authgui.inc,/ (root) is /index.php, make sure we're matching the correct item. https://github.com/opnsense/core/issues/724

This commit is contained in:
Ad Schellevis 2016-02-12 17:51:20 +01:00
parent daebae4f3b
commit bd62b3ebcb

View File

@ -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 ,"*"))
continue;
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']);