Skip to content

Commit

Permalink
Add condition for isShipped
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Dec 14, 2024
1 parent 5e856b6 commit 3c0662f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/Command/Integrity/CheckApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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;
Expand All @@ -24,6 +25,7 @@
class CheckApp extends Base {
public function __construct(
private Checker $checker,
private ?IAppManager $appManager,
private AppLocator $appLocator,
private FileAccessHelper $fileAccessHelper,
) {
Expand Down Expand Up @@ -51,7 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
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);
Expand Down

0 comments on commit 3c0662f

Please sign in to comment.