From 0058e88217efe7068eaf4fe01c13fff9a913045e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 19 Dec 2025 01:53:05 +1300 Subject: [PATCH] Fix auth calls --- app/controllers/general.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 31647eb994..638df72419 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1034,7 +1034,8 @@ App::init() ->inject('dbForPlatform') ->inject('queueForCertificates') ->inject('platform') - ->action(function (Request $request, Document $console, Database $dbForPlatform, Certificate $queueForCertificates, array $platform) { + ->inject('authorization') + ->action(function (Request $request, Document $console, Database $dbForPlatform, Certificate $queueForCertificates, array $platform, Authorization $authorization) { $hostname = $request->getHostname(); $cache = Config::getParam('hostnames', []); $platformHostnames = $platform['hostnames'] ?? []; @@ -1065,7 +1066,7 @@ App::init() } // 4. Check/create rule (requires DB access) - Authorization::disable(); + $authorization->disable(); try { // TODO: (@Meldiron) Remove after 1.7.x migration $isMd5 = System::getEnv('_APP_RULES_FORMAT') === 'md5'; @@ -1121,7 +1122,7 @@ App::init() } finally { $cache[$domain->get()] = true; Config::setParam('hostnames', $cache); - Authorization::reset(); + $authorization->reset(); } });