Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2022-05-25 09:51:16 +0300
committerThomas Citharel <tcit@tcit.fr>2022-06-15 11:29:16 +0300
commit47ea43ea49e63129c0a731d8ac29e38920eda6ac (patch)
treeb4c005d9dce9f0e4b403dee92a38ebc16d523479 /apps
parentda8450e854404a2feee7169e379f4f64f685e170 (diff)
Make sure ResetTokenBackgroundJob doesn't execute if config is read-only
No need to try to delete the config key in config.php if we aren't allowed to. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps')
-rw-r--r--apps/updatenotification/lib/ResetTokenBackgroundJob.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/updatenotification/lib/ResetTokenBackgroundJob.php b/apps/updatenotification/lib/ResetTokenBackgroundJob.php
index 96a50c5ff7f..0d07c7301d9 100644
--- a/apps/updatenotification/lib/ResetTokenBackgroundJob.php
+++ b/apps/updatenotification/lib/ResetTokenBackgroundJob.php
@@ -59,7 +59,7 @@ class ResetTokenBackgroundJob extends TimedJob {
*/
protected function run($argument) {
// Delete old tokens after 2 days
- if ($this->timeFactory->getTime() - $this->config->getAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()) >= 172800) {
+ if ($this->config->getSystemValueBool('config_is_read_only') === false && $this->timeFactory->getTime() - (int) $this->config->getAppValue('core', 'updater.secret.created', (string) $this->timeFactory->getTime()) >= 172800) {
$this->config->deleteSystemValue('updater.secret');
}
}