From 8826f9f6f71ce73c43b021013e6121e21e7ef701 Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Mon, 12 Dec 2022 23:39:05 -0800 Subject: [PATCH] Update: Destroy the current session --- src/library/Box/Update.php | 5 +++++ .../Extension/html_admin/mod_extension_index.html.twig | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/library/Box/Update.php b/src/library/Box/Update.php index 13361f776..12d4e8688 100644 --- a/src/library/Box/Update.php +++ b/src/library/Box/Update.php @@ -189,6 +189,11 @@ class Box_Update $this->di['tools']->emptyFolder(PATH_CACHE); $this->di['tools']->emptyFolder(PATH_ROOT.'/install'); rmdir(PATH_ROOT.'/install'); + + // Log off the current user and destroy the session. + $this->di['cookie']->delete('BOXADMR'); + $this->di['session']->delete('admin'); + session_destroy(); return true; } diff --git a/src/modules/Extension/html_admin/mod_extension_index.html.twig b/src/modules/Extension/html_admin/mod_extension_index.html.twig index 2409a5eaa..ebcf4f8cb 100644 --- a/src/modules/Extension/html_admin/mod_extension_index.html.twig +++ b/src/modules/Extension/html_admin/mod_extension_index.html.twig @@ -107,7 +107,7 @@

{{ 'Automatic updater is a tool to update FOSSBilling to latest version in one click. Works on these hosting environments where PHP has permissions to overwrite files uploaded via FTP.'|trans }}

{{ admin.system_release_notes|bbmd }} - +