diff --git a/src/Common/Controller/Base.php b/src/Common/Controller/Base.php index bf5fde75..c5ef7ac2 100644 --- a/src/Common/Controller/Base.php +++ b/src/Common/Controller/Base.php @@ -395,9 +395,11 @@ protected function passwordProtectedRequest(): void $oInput = Factory::service('Input'); /** @var ErrorHandler $oErrorHandler */ $oErrorHandler = Factory::service('ErrorHandler'); + /** @var MetaData $oMetaData */ + $oMetaData = Factory::service('MetaData'); // Send headers immediately - header('WWW-Authenticate: Basic realm="' . Config::get('APP_NAME') . ' - Restricted Area"'); + header('WWW-Authenticate: Basic realm="' . $oMetaData->getAppName() . ' - Restricted Area"'); header($oInput->server('SERVER_PROTOCOL') . ' 401 Unauthorized'); $oErrorHandler->show401(null, null, true, true);