Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions lib/private/App/AppManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ public function disableApp($appId, $automaticDisabled = false): void {
$appData = $this->getAppInfo($appId);
if (!is_null($appData)) {
\OC_App::executeRepairSteps($appId, $appData['repair-steps']['uninstall']);
\OC_App::removeBackgroundJobs($appData['background-jobs']);
}

$this->dispatcher->dispatchTyped(new AppDisableEvent($appId));
Expand Down
7 changes: 7 additions & 0 deletions lib/private/legacy/OC_App.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
\OC::$server->registerNamespace($app, $appNamespace);

if (file_exists($path . '/composer/autoload.php')) {
require_once $path . '/composer/autoload.php';

Check failure on line 115 in lib/private/legacy/OC_App.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-security

TaintedInclude

lib/private/legacy/OC_App.php:115:17: TaintedInclude: Detected tainted code passed to include or similar (see https://psalm.dev/251)
} else {
\OC::$composerAutoloader->addPsr4($appNamespace . '\\', $path . '/lib/', true);
}
Expand Down Expand Up @@ -755,6 +755,13 @@
$r->run();
}

public static function removeBackgroundJobs(array $jobs) {
$queue = \OC::$server->getJobList();
foreach ($jobs as $job) {
$queue->remove($job);
}
}

public static function setupBackgroundJobs(array $jobs) {
$queue = \OC::$server->getJobList();
foreach ($jobs as $job) {
Expand Down
Loading