Skip to content

Commit

Permalink
clean route
Browse files Browse the repository at this point in the history
  • Loading branch information
aheinze committed Sep 9, 2021
1 parent 1f342c5 commit f191918
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -23,7 +23,7 @@

# admin route
if (COCKPIT_ADMIN && !defined('COCKPIT_ADMIN_ROUTE')) {
$route = preg_replace('#'.preg_quote(COCKPIT_BASE_URL, '#').'#', '', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 1);
$route = str_replace('../', '', preg_replace('#'.preg_quote(COCKPIT_BASE_URL, '#').'#', '', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 1));
define('COCKPIT_ADMIN_ROUTE', $route == '' ? '/' : $route);
}

Expand Down

0 comments on commit f191918

Please sign in to comment.