]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(appconfig): compare with original value 44642/head
authorMaxence Lange <maxence@artificial-owl.com>
Wed, 3 Apr 2024 17:56:19 +0000 (16:56 -0100)
committerMaxence Lange <maxence@artificial-owl.com>
Wed, 3 Apr 2024 17:56:19 +0000 (16:56 -0100)
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
lib/private/AppConfig.php

index 518ba6ebf7a01026477bb646351c5182e3d8a6d9..5d753a6ee9ca96386fac224423e173d650101faa 100644 (file)
@@ -751,6 +751,7 @@ class AppConfig implements IAppConfig {
                $sensitive = $this->isTyped(self::VALUE_SENSITIVE, $type);
                $inserted = $refreshCache = false;
 
+               $origValue = $value;
                if ($sensitive || ($this->hasKey($app, $key, $lazy) && $this->isSensitive($app, $key, $lazy))) {
                        $value = self::ENCRYPTION_PREFIX . $this->crypto->encrypt($value);
                }
@@ -760,7 +761,7 @@ class AppConfig implements IAppConfig {
                         * no update if key is already known with set lazy status and value is
                         * not different, unless sensitivity is switched from false to true.
                         */
-                       if ($value === $this->getTypedValue($app, $key, $value, $lazy, $type)
+                       if ($origValue === $this->getTypedValue($app, $key, $value, $lazy, $type)
                                && (!$sensitive || $this->isSensitive($app, $key, $lazy))) {
                                return false;
                        }