From bd62b3ebcb1be5b88b0b61428574ef859a07fe74 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Fri, 12 Feb 2016 17:51:20 +0100 Subject: [PATCH] (legacy) authgui.inc,/ (root) is /index.php, make sure we're matching the correct item. https://github.com/opnsense/core/issues/724 --- src/etc/inc/authgui.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/etc/inc/authgui.inc b/src/etc/inc/authgui.inc index 5eae174ef..c7b4aeefe 100644 --- a/src/etc/inc/authgui.inc +++ b/src/etc/inc/authgui.inc @@ -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']);