From abc4ced1e77cf751a0414b03300c37715ee8f33c Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Wed, 3 Apr 2024 16:56:19 -0100 Subject: [PATCH] fix(appconfig): compare with original value Signed-off-by: Maxence Lange --- lib/private/AppConfig.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php index 518ba6ebf7a01..5d753a6ee9ca9 100644 --- a/lib/private/AppConfig.php +++ b/lib/private/AppConfig.php @@ -751,6 +751,7 @@ private function setTypedValue( $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 @@ private function setTypedValue( * 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; }