From 77938cfca97b59568272e30b040b2d4aed0c56bd Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 25 May 2022 08:51:16 +0200 Subject: 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 --- apps/updatenotification/lib/ResetTokenBackgroundJob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/updatenotification') 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'); } } -- cgit v1.2.3