فهرست منبع

remove bruteforce patch after matomo 4.0.5 update

Olivier Massot 5 سال پیش
والد
کامیت
85f61d3909

+ 0 - 4
ot_stats/Classes/Controller/OtStatsController.php

@@ -42,10 +42,6 @@ class OtStatsController extends SelectedSiteController {
         $period = isset($args['period']) ? $args['period'] : 'month';
         $this->view->assign('period', $period);
 
-        // <-- Shall be removed when a fix is released for https://github.com/matomo-org/matomo/issues/16867
-        $matomoRepository = GeneralUtility::makeInstance(MatomoWebsiteRepository::class);
-        $matomoRepository->clearBruteforceLog();
-        // -->
     }
 
     /**

+ 0 - 11
ot_stats/Classes/Domain/Repository/MatomoWebsiteRepository.php

@@ -266,15 +266,4 @@ class MatomoWebsiteRepository
             throw $e;
         }
     }
-
-    /**
-     * A little workaround before the release of a fix for this issue:
-     *   https://github.com/matomo-org/matomo/issues/16867#issuecomment-738639828
-     */
-    public function clearBruteforceLog() {
-        $remoteIp = $_SERVER['REMOTE_ADDR'];
-        $stmt = $this->matomoCnn->prepare(
-            "DELETE FROM matomo.matomo_brute_force_log WHERE ip_address='" . $remoteIp .  "'");
-        $stmt->execute();
-    }
 }