diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2024-08-07 09:05:12 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-08-07 08:27:44 +0000 |
commit | a23ab367f03e727e5a14258309c941234f412f2a (patch) | |
tree | 20f4a2ac58abe47d8a9890c187d404567171ffcd | |
parent | 8a913e4cf61d9c84b0633cf29e43640364010617 (diff) | |
download | nextcloud-server-a23ab367f03e727e5a14258309c941234f412f2a.tar.gz nextcloud-server-a23ab367f03e727e5a14258309c941234f412f2a.zip |
fix(theming): make cache buster depend on the app version
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
-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 71ab0a6dc6c..61930037fb5 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -334,12 +334,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); } } |