pixelfed-container/patches/0004-disable-beagle-service...

43 lines
1.7 KiB
Diff
Raw Normal View History

2024-02-25 14:47:20 +01:00
From c6c208aef154d2ab683d794bb5b95fa508c757da Mon Sep 17 00:00:00 2001
From: chris <cg@zknt.org>
Date: Wed, 24 Jan 2024 13:05:34 +0100
2023-10-08 15:00:18 +02:00
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 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/Services/Account/RemoteAuthService.php b/app/Services/Account/RemoteAuthService.php
2024-02-25 14:47:20 +01:00
index 4412352a..667265be 100644
2023-10-08 15:00:18 +02:00
--- a/app/Services/Account/RemoteAuthService.php
+++ b/app/Services/Account/RemoteAuthService.php
@@ -120,6 +120,7 @@ class RemoteAuthService
}
return Cache::remember(self::CACHE_KEY . 'domain-compatible:' . $domain, 14400, function() use($domain) {
2024-02-25 14:47:20 +01:00
+ return true;
2023-10-08 15:00:18 +02:00
try {
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/domain?domain=' . $domain);
if(!$res->ok()) {
@@ -144,6 +145,7 @@ class RemoteAuthService
public static function lookupWebfingerUses($wf)
{
2024-02-25 14:47:20 +01:00
+ return 0;
2023-10-08 15:00:18 +02:00
try {
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/lookup?webfinger=' . $wf);
if(!$res->ok()) {
@@ -166,6 +168,7 @@ class RemoteAuthService
public static function submitToBeagle($ow, $ou, $dw, $du)
{
2024-02-25 14:47:20 +01:00
+ return;
2023-10-08 15:00:18 +02:00
try {
$url = 'https://beagle.pixelfed.net/api/v1/raa/submit';
$res = Http::throw()->timeout(10)->get($url, [
--
2024-02-25 14:47:20 +01:00
2.43.0