diff --git a/Sources/Actions/Admin/Themes.php b/Sources/Actions/Admin/Themes.php index 861248fff4..8cafae0330 100644 --- a/Sources/Actions/Admin/Themes.php +++ b/Sources/Actions/Admin/Themes.php @@ -1585,6 +1585,8 @@ protected function installCopy(): array */ protected function installDir(): array { + $_REQUEST['theme_dir'] = rtrim($_REQUEST['theme_dir'], '\\/'); + // Cannot use the theme dir as a theme dir. if (!isset($_REQUEST['theme_dir']) || empty($_REQUEST['theme_dir']) || rtrim(realpath($_REQUEST['theme_dir']), '/\\') == realpath(Utils::$context['themedir'])) { ErrorHandler::fatalLang('theme_install_invalid_dir', false);