diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2024-08-07 09:05:12 +0200 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2024-08-07 09:48:48 +0200 |
commit | 087f74806ddf431d182636ba0bf3497fdf74fb20 (patch) | |
tree | 6a0970f27bd1deeda1e6a00e7c7415ae65905181 /apps/theming | |
parent | fbbc10466b79caea0b9d1f718d4abdd021df241c (diff) | |
download | nextcloud-server-087f74806ddf431d182636ba0bf3497fdf74fb20.tar.gz nextcloud-server-087f74806ddf431d182636ba0bf3497fdf74fb20.zip |
fix(theming): make cache buster depend on the app version
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'apps/theming')
-rw-r--r-- | apps/theming/lib/Util.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index ec85120413f..3ed359f7e07 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -311,12 +311,14 @@ class Util { 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); } } |