Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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 <[email protected]>
  • Loading branch information
tcitworld committed Jun 15, 2022
commit 47ea43ea49e63129c0a731d8ac29e38920eda6ac
2 changes: 1 addition & 1 deletion apps/updatenotification/lib/ResetTokenBackgroundJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(IConfig $config,
*/
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');
}
}
Expand Down