From df5cf6b980a5195e09ed0950a1b204f7ce089c60 Mon Sep 17 00:00:00 2001 From: phili67 Date: Tue, 3 Sep 2024 18:26:39 +0200 Subject: [PATCH] src/EcclesiaCRM/Service/AppIntegrityService.php : signature files missing --- src/EcclesiaCRM/Service/AppIntegrityService.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/EcclesiaCRM/Service/AppIntegrityService.php b/src/EcclesiaCRM/Service/AppIntegrityService.php index c1a0af56c..f1bc373f7 100644 --- a/src/EcclesiaCRM/Service/AppIntegrityService.php +++ b/src/EcclesiaCRM/Service/AppIntegrityService.php @@ -63,10 +63,10 @@ public static function verifyApplicationIntegrity() : array } } } else { - return ['status' => 'failure', 'message' => _('Signature definition file signature failed validation')]; + return ['status' => 'failure', 'message' => _('Signature definition file signature failed validation'), 'files' => []]; } } else { - return ['status' => 'failure', 'message' => _('Signature definition File Missing')]; + return ['status' => 'failure', 'message' => _('Signature definition File Missing'), 'files' => []]; } $pluginsIntegrity = AppIntegrityService::verifyPluginsIntegrity([]); @@ -104,6 +104,7 @@ public static function getIntegrityCheckMessage(): string public static function getFilesFailingIntegrityCheck(): array { + if (AppIntegrityService::verifyApplicationIntegrity()['status'] === 'failure') { return AppIntegrityService::verifyApplicationIntegrity()['files']; } @@ -139,10 +140,10 @@ public static function verifyPluginsIntegrity($signatureFailures = []): array } } } else { - return ['status' => 'failure', 'message' => _('Signature definition file signature failed validation')]; + return ['status' => 'failure', 'message' => _('Signature definition file signature failed validation'), 'files' => []]; } } else { - return ['status' => 'failure', 'message' => _('Signature definition File Missing')]; + return ['status' => 'failure', 'message' => _('Signature definition File Missing'), 'files' => []]; } } }