diff options
author | Thomas Citharel <tcit@tcit.fr> | 2022-05-25 09:51:16 +0300 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-06-15 12:56:19 +0300 |
commit | 77938cfca97b59568272e30b040b2d4aed0c56bd (patch) | |
tree | be92b4aa42222ed10a18e2e52392c0bb1b2fbb2f /apps/updatenotification | |
parent | 224aed88393c601e7800d4b3c058f27b6c067a64 (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/updatenotification')
-rw-r--r-- | apps/updatenotification/lib/ResetTokenBackgroundJob.php | 2 |
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'); } } |