diff --git a/src/system/modules/metamodels/MetaModels/BackendIntegration/Boot.php b/src/system/modules/metamodels/MetaModels/BackendIntegration/Boot.php index f2e3f3bc3..9bb9e381c 100644 --- a/src/system/modules/metamodels/MetaModels/BackendIntegration/Boot.php +++ b/src/system/modules/metamodels/MetaModels/BackendIntegration/Boot.php @@ -122,9 +122,11 @@ protected static function authenticateBackendUser() return; } - $Env->base = $Env->url . $GLOBALS['TL_CONFIG']['websitePath'] . '/'; + // Fix issue #397 - the security patch rendered our redirect method non working (websitePath can now be null). + $path = constant('TL_PATH') ?: $GLOBALS['TL_CONFIG']['websitePath']; + $Env->base = $Env->url . $path . '/'; $Env->script = preg_replace( - '/^' . preg_quote($GLOBALS['TL_CONFIG']['websitePath'], '/') . '\/?/i', + '/^' . preg_quote($path, '/') . '\/?/i', '', $Env->scriptName ); @@ -134,7 +136,7 @@ protected static function authenticateBackendUser() // generate a url without replacing the basepath(TL_PATH) with an empty string. if (!defined(TL_PATH)) { - define('TL_PATH', $GLOBALS['TL_CONFIG']['websitePath']); + define('TL_PATH', $path); } $objUser->authenticate();