From 7a29b79f4c6ac1905607b0f988a87776e3dfbc14 Mon Sep 17 00:00:00 2001 From: Nolan Ehrstrom Date: Wed, 17 Sep 2025 15:15:08 -0700 Subject: [PATCH] Reset encrypter after setting tenant app key --- ProcessMaker/Multitenancy/SwitchTenant.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ProcessMaker/Multitenancy/SwitchTenant.php b/ProcessMaker/Multitenancy/SwitchTenant.php index f5c0d16bb0..e522798a8c 100644 --- a/ProcessMaker/Multitenancy/SwitchTenant.php +++ b/ProcessMaker/Multitenancy/SwitchTenant.php @@ -113,6 +113,9 @@ public function makeCurrent(IsTenant $tenant): void } config($config); + // The previous app key was saved in the singleton, so we need to forget it. + $app->forgetInstance('encrypter'); + // Extend BroadcastManager to our custom implementation that prefixes the channel names with the tenant id. $app->extend(BroadcastManager::class, function ($manager, $app) use ($tenant) { return new TenantAwareBroadcastManager($app, $tenant->id);