diff --git a/src/etc/inc/auth_func.inc b/src/etc/inc/auth_func.inc index 795ccdbdf1..e142e4f42c 100644 --- a/src/etc/inc/auth_func.inc +++ b/src/etc/inc/auth_func.inc @@ -42,6 +42,16 @@ function cmp_page_matches($page, & $matches, $fullwc = true) { $file = realpath( $g['www_path'] . '/' . ltrim($file, '/')); if (empty($file)) { /* File does not exist, or other path shenanigans */ + + /* Some tabs are just JS anchors, detect this case. */ + if ((substr($page, 0, 1) == "#") && + (strpos($page, '.') === false) && + (strpos($page, '/') === false) && + (strpos($page, '?') === false)) { + return true; + } + + /* Tried to query a path that does not exist */ return false; } $page = str_replace($g['www_path'] . '/', '', $file);