From 2ad9b6dc84999b7c7b7860179e4ece9658e79366 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 28 Dec 2017 14:39:35 -0700 Subject: [PATCH] =?UTF-8?q?Fixes=20that=20=E2=80=98should=E2=80=99=20work.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/src/Grav/Common/Session.php | 2 +- system/src/Grav/Common/Uri.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Common/Session.php b/system/src/Grav/Common/Session.php index 7c74392fc..dffc01650 100644 --- a/system/src/Grav/Common/Session.php +++ b/system/src/Grav/Common/Session.php @@ -40,7 +40,7 @@ class Session extends BaseSession $session_timeout = $config->get('system.session.timeout', 1800); $session_path = $config->get('system.session.path'); if (!$session_path) { - $session_path = '/' . ltrim($base_url, '/'); + $session_path = '/' . ltrim(Uri::filterPath($base_url), '/'); } // Activate admin if we're inside the admin path. diff --git a/system/src/Grav/Common/Uri.php b/system/src/Grav/Common/Uri.php index a67b19217..56e425af2 100644 --- a/system/src/Grav/Common/Uri.php +++ b/system/src/Grav/Common/Uri.php @@ -985,7 +985,7 @@ class Uri // Handle route only if ($route_only) { - $url_path = str_replace($base_url, '', $url_path); + $url_path = str_replace(static::filter($base_url), '', $url_path); } // transform back to string/array as needed