From ff60dcd7310d164900ab6d667a74e0514143eff2 Mon Sep 17 00:00:00 2001 From: chris Date: Sat, 20 Apr 2024 16:20:41 +0200 Subject: [PATCH 4/6] disable beagle service beagle is a remote API service provided by dansup and used for centralised lookups. Using the beagle service without users explicit consent violates GDPR. As it's not configurable at the moment this patch disables remote communication with beagle. --- app/Services/Account/RemoteAuthService.php | 4 ++++ app/Services/Internal/BeagleService.php | 1 + 2 files changed, 5 insertions(+) diff --git a/app/Services/Account/RemoteAuthService.php b/app/Services/Account/RemoteAuthService.php index 4412352a..0c69959f 100644 --- a/app/Services/Account/RemoteAuthService.php +++ b/app/Services/Account/RemoteAuthService.php @@ -115,11 +115,13 @@ class RemoteAuthService public static function isDomainCompatible($domain = false) { + return true; if(!$domain) { return false; } return Cache::remember(self::CACHE_KEY . 'domain-compatible:' . $domain, 14400, function() use($domain) { + return true; try { $res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/domain?domain=' . $domain); if(!$res->ok()) { @@ -144,6 +146,7 @@ class RemoteAuthService public static function lookupWebfingerUses($wf) { + return 0; try { $res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/lookup?webfinger=' . $wf); if(!$res->ok()) { @@ -166,6 +169,7 @@ class RemoteAuthService public static function submitToBeagle($ow, $ou, $dw, $du) { + return; try { $url = 'https://beagle.pixelfed.net/api/v1/raa/submit'; $res = Http::throw()->timeout(10)->get($url, [ diff --git a/app/Services/Internal/BeagleService.php b/app/Services/Internal/BeagleService.php index 60a4f78e..f8c9442c 100644 --- a/app/Services/Internal/BeagleService.php +++ b/app/Services/Internal/BeagleService.php @@ -13,6 +13,7 @@ class BeagleService public static function getDefaultRules() { + return []; return Cache::remember(self::DEFAULT_RULES_CACHE_KEY, now()->addDays(7), function() { try { $res = Http::withOptions(['allow_redirects' => false]) -- 2.44.0