Skip to content

Commit 40d5495

Browse files
authored
Merge pull request #44645 from nextcloud/backport/44642/stable29
[stable29] fix(appconfig): compare with original value
2 parents 2617645 + abc4ced commit 40d5495

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/private/AppConfig.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,7 @@ private function setTypedValue(
751751
$sensitive = $this->isTyped(self::VALUE_SENSITIVE, $type);
752752
$inserted = $refreshCache = false;
753753

754+
$origValue = $value;
754755
if ($sensitive || ($this->hasKey($app, $key, $lazy) && $this->isSensitive($app, $key, $lazy))) {
755756
$value = self::ENCRYPTION_PREFIX . $this->crypto->encrypt($value);
756757
}
@@ -760,7 +761,7 @@ private function setTypedValue(
760761
* no update if key is already known with set lazy status and value is
761762
* not different, unless sensitivity is switched from false to true.
762763
*/
763-
if ($value === $this->getTypedValue($app, $key, $value, $lazy, $type)
764+
if ($origValue === $this->getTypedValue($app, $key, $value, $lazy, $type)
764765
&& (!$sensitive || $this->isSensitive($app, $key, $lazy))) {
765766
return false;
766767
}

0 commit comments

Comments
 (0)