mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
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>
This commit is contained in:
parent
52fc620ba1
commit
ff16e0425d
1 changed files with 1 additions and 1 deletions
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue