File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
apps/updatenotification/lib/BackgroundJob Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,17 @@ protected function run($argument) {
4343 return ;
4444 }
4545
46- $ secretCreated = $ this ->appConfig ->getValueInt ('core ' , 'updater.secret.created ' );
46+ $ secretCreated = $ this ->appConfig ->getValueInt ('core ' , 'updater.secret.created ' , 0 );
47+
48+ if ($ secretCreated === 0 ) {
49+ if ($ this ->config ->getSystemValueString ('updater.secret ' ) !== '' ) {
50+ $ this ->logger ->error ('Cleared old `updater.secret` with unknown creation date ' , ['app ' => 'updatenotification ' ]);
51+ $ this ->config ->deleteSystemValue ('updater.secret ' );
52+ }
53+ $ this ->logger ->debug ('Skipping `updater.secret` reset since there is none ' , ['app ' => 'updatenotification ' ]);
54+ return ;
55+ }
56+
4757 // Delete old tokens after 2 days and also tokens without any created date
4858 $ secretCreatedDiff = $ this ->time ->getTime () - $ secretCreated ;
4959 if ($ secretCreatedDiff >= 172800 ) {
You can’t perform that action at this time.
0 commit comments