diff options
author | Seungmin Kim <8457324+ehfd@users.noreply.github.com> | 2024-12-14 19:02:50 +0900 |
---|---|---|
committer | Seungmin Kim <8457324+ehfd@users.noreply.github.com> | 2024-12-17 09:36:13 +0900 |
commit | ab9ac5046bfdad5220361936af0bc6c10fc1ef17 (patch) | |
tree | 43cdc2465d3be43c5d068d3fa5ae74ce2872ed7b /core | |
parent | 5a457b8da5f2c8687b1a97a5f88769c666cd05e6 (diff) | |
download | nextcloud-server-ab9ac5046bfdad5220361936af0bc6c10fc1ef17.tar.gz nextcloud-server-ab9ac5046bfdad5220361936af0bc6c10fc1ef17.zip |
fix(occ): Add condition for isShipped
Signed-off-by: Seungmin Kim <8457324+ehfd@users.noreply.github.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/Integrity/CheckApp.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/Command/Integrity/CheckApp.php b/core/Command/Integrity/CheckApp.php index b5706b2b24e..403d36b6c87 100644 --- a/core/Command/Integrity/CheckApp.php +++ b/core/Command/Integrity/CheckApp.php @@ -11,6 +11,7 @@ use OC\Core\Command\Base; use OC\IntegrityCheck\Checker; use OC\IntegrityCheck\Helpers\AppLocator; use OC\IntegrityCheck\Helpers\FileAccessHelper; +use OCP\App\IAppManager; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -24,6 +25,7 @@ use Symfony\Component\Console\Output\OutputInterface; class CheckApp extends Base { public function __construct( private Checker $checker, + private ?IAppManager $appManager, private AppLocator $appLocator, private FileAccessHelper $fileAccessHelper, ) { @@ -51,7 +53,7 @@ class CheckApp extends Base { if ($path === '') { $path = $this->appLocator->getAppPath($appid); } - if ($this->fileAccessHelper->file_exists($path . '/appinfo/signature.json')) { + if ($this->appManager->isShipped($appid) || $this->fileAccessHelper->file_exists($path . '/appinfo/signature.json')) { // Only verify if the application explicitly ships a signature.json file $result = $this->checker->verifyAppSignature($appid, $path, true); $this->writeArrayInOutputFormat($input, $output, $result); |