From b35a2585186f31c5a1aae92d13c31a28712305df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Wed, 18 Oct 2017 14:36:00 +0200 Subject: [PATCH 01/83] [FEATURE] Show extension dependencies of installed version --- Resources/Private/Templates/Client/Show.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Resources/Private/Templates/Client/Show.html b/Resources/Private/Templates/Client/Show.html index 69c7ac9..8d00f7a 100644 --- a/Resources/Private/Templates/Client/Show.html +++ b/Resources/Private/Templates/Client/Show.html @@ -123,6 +123,7 @@

{f:translate(key:'found.in.ter')} + @@ -132,7 +133,9 @@

{extension.name} - {extension.version} + + {extension.version} + {extension.state -> monitor:format.extensionState()} From 3ed91de68340cad8246f2d73bb4adb08fc1f1152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albrecht=20Ko=CC=88hnlein?= Date: Mon, 30 Apr 2018 15:36:00 +0200 Subject: [PATCH 02/83] [BUGFIX] Use QueryBilder instances only once to avoid problems with non-unique aliases --- Classes/Service/DataIntegrity.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Classes/Service/DataIntegrity.php b/Classes/Service/DataIntegrity.php index 670b6f1..1d96179 100644 --- a/Classes/Service/DataIntegrity.php +++ b/Classes/Service/DataIntegrity.php @@ -255,10 +255,8 @@ protected function usedExtensions() ->execute() ->fetchAll(); - $queryBuilder = $connection->createQueryBuilder(); - $queryBuilder2 = $connection->createQueryBuilder(); foreach ($clients as $client) { - $countInsecure = $queryBuilder + $countInsecure = $connection->createQueryBuilder() ->count('uid') ->from('tx_t3monitoring_client_extension_mm') ->leftJoin( @@ -274,7 +272,7 @@ protected function usedExtensions() )->execute()->fetchColumn(0); // count outdated extensions - $countOutdated = $queryBuilder2 + $countOutdated = $connection->createQueryBuilder() ->count('uid') ->from('tx_t3monitoring_client_extension_mm') ->leftJoin( From 6416ac412b66853b72282d74774231fc8fd1eed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albrecht=20Ko=CC=88hnlein?= Date: Mon, 30 Apr 2018 16:02:05 +0200 Subject: [PATCH 03/83] [BUGFIX] Use QueryBilder instances only once --- Classes/Service/DataIntegrity.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Classes/Service/DataIntegrity.php b/Classes/Service/DataIntegrity.php index 1d96179..629271f 100644 --- a/Classes/Service/DataIntegrity.php +++ b/Classes/Service/DataIntegrity.php @@ -256,7 +256,8 @@ protected function usedExtensions() ->fetchAll(); foreach ($clients as $client) { - $countInsecure = $connection->createQueryBuilder() + $queryBuilder = $connection->createQueryBuilder(); + $countInsecure = $queryBuilder ->count('uid') ->from('tx_t3monitoring_client_extension_mm') ->leftJoin( @@ -272,7 +273,8 @@ protected function usedExtensions() )->execute()->fetchColumn(0); // count outdated extensions - $countOutdated = $connection->createQueryBuilder() + $queryBuilder2 = $connection->createQueryBuilder(); + $countOutdated = $queryBuilder2 ->count('uid') ->from('tx_t3monitoring_client_extension_mm') ->leftJoin( From 4f260434f19abb9fca0d1e738088f0f94c5f7995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albrecht=20Ko=CC=88hnlein?= Date: Tue, 1 May 2018 11:26:26 +0200 Subject: [PATCH 04/83] [TASK] Include extra dangers in report emails --- Classes/Domain/Repository/ClientRepository.php | 1 + Resources/Private/Templates/Notification/AdminEmail.txt | 2 ++ Resources/Private/Templates/Notification/ClientEmail.txt | 2 ++ 3 files changed, 5 insertions(+) diff --git a/Classes/Domain/Repository/ClientRepository.php b/Classes/Domain/Repository/ClientRepository.php index c400515..acff50b 100644 --- a/Classes/Domain/Repository/ClientRepository.php +++ b/Classes/Domain/Repository/ClientRepository.php @@ -68,6 +68,7 @@ public function getAllForReport($emailAddressRequired = false) $demand = $this->getFilterDemand(); $demand->setWithInsecureCore(true); $demand->setWithInsecureExtensions(true); + $demand->setWithExtraDanger(true); $constraints[] = $query->logicalOr( $this->getConstraints($demand, $query) diff --git a/Resources/Private/Templates/Notification/AdminEmail.txt b/Resources/Private/Templates/Notification/AdminEmail.txt index f30dee1..68303c5 100644 --- a/Resources/Private/Templates/Notification/AdminEmail.txt +++ b/Resources/Private/Templates/Notification/AdminEmail.txt @@ -8,5 +8,7 @@ Monitoring report of your clients Insecure core: {f:if(condition:client.core.insecure,then:client.core.version)} Insecure extensions: - {e.name} {e.version} +Extra dangers: + - {key}: {value} \ No newline at end of file diff --git a/Resources/Private/Templates/Notification/ClientEmail.txt b/Resources/Private/Templates/Notification/ClientEmail.txt index ab348eb..4c4363b 100644 --- a/Resources/Private/Templates/Notification/ClientEmail.txt +++ b/Resources/Private/Templates/Notification/ClientEmail.txt @@ -5,3 +5,5 @@ This is an automatically generated report for {client.domain}: Insecure core: {f:if(condition:client.core.insecure,then:client.core.version)} Insecure extensions: - {e.name} {e.version} +Extra dangers: + - {key}: {value} From 1a553992d40d44d6b238d9975c1ee1ae61c5205e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albrecht=20Ko=CC=88hnlein?= Date: Tue, 1 May 2018 11:42:45 +0200 Subject: [PATCH 05/83] [BUGFIX] Update security news URLs after typo3.org relaunch --- Classes/Controller/StatisticController.php | 4 ++-- Resources/Private/Templates/Statistic/Index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Controller/StatisticController.php b/Classes/Controller/StatisticController.php index 5eeb578..125665d 100644 --- a/Classes/Controller/StatisticController.php +++ b/Classes/Controller/StatisticController.php @@ -1,4 +1,5 @@ emConfiguration->getLoadBulletins()) { /** @var BulletinImport $bulletinImport */ - $bulletinImport = GeneralUtility::makeInstance(BulletinImport::class, - 'https://typo3.org/xml-feeds/security/1/rss.xml', 5); + $bulletinImport = GeneralUtility::makeInstance(BulletinImport::class, 'https://typo3.org/?type=101', 5); $feedItems = $bulletinImport->start(); } diff --git a/Resources/Private/Templates/Statistic/Index.html b/Resources/Private/Templates/Statistic/Index.html index e4083fe..29cb003 100644 --- a/Resources/Private/Templates/Statistic/Index.html +++ b/Resources/Private/Templates/Statistic/Index.html @@ -206,7 +206,7 @@ From 03ea0796f98b08a1f3ae3b3fa6aaa5fa73f38a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albrecht=20Ko=CC=88hnlein?= Date: Tue, 1 May 2018 11:52:48 +0200 Subject: [PATCH 06/83] [BUGFIX] Use tag instead of to not have problems with HTTPS links --- Resources/Private/Templates/Statistic/Index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Private/Templates/Statistic/Index.html b/Resources/Private/Templates/Statistic/Index.html index e4083fe..81a3efb 100644 --- a/Resources/Private/Templates/Statistic/Index.html +++ b/Resources/Private/Templates/Statistic/Index.html @@ -181,9 +181,9 @@