diff options
author | Thomas Citharel <tcit@tcit.fr> | 2022-05-25 09:51:16 +0300 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2022-06-15 11:29:16 +0300 |
commit | 47ea43ea49e63129c0a731d8ac29e38920eda6ac (patch) | |
tree | b4c005d9dce9f0e4b403dee92a38ebc16d523479 /apps/updatenotification | |
parent | da8450e854404a2feee7169e379f4f64f685e170 (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'); } } |