From a23ab367f03e727e5a14258309c941234f412f2a Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Wed, 7 Aug 2024 09:05:12 +0200 Subject: [PATCH] fix(theming): make cache buster depend on the app version Signed-off-by: Richard Steinmetz --- apps/theming/lib/Util.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index 71ab0a6dc6cd1..61930037fb59f 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -334,12 +334,14 @@ public function getCacheBuster(): string { if (!is_null($user)) { $userId = $user->getUID(); } + $serverVersion = \OC_Util::getVersionString(); + $themingAppVersion = $this->appManager->getAppVersion('theming'); $userCacheBuster = ''; if ($userId) { $userCacheBusterValue = (int)$this->config->getUserValue($userId, 'theming', 'userCacheBuster', '0'); $userCacheBuster = $userId . '_' . $userCacheBusterValue; } $systemCacheBuster = $this->config->getAppValue('theming', 'cachebuster', '0'); - return substr(sha1($userCacheBuster . $systemCacheBuster), 0, 8); + return substr(sha1($serverVersion . $themingAppVersion . $userCacheBuster . $systemCacheBuster), 0, 8); } }