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

50 lines
1.8 KiB
Diff
Raw Normal View History

2024-03-12 16:11:50 +00:00
From e00187bc43511a6f21d2486834e44900f5b64bae Mon Sep 17 00:00:00 2001
2024-01-24 12:20:14 +00:00
From: chris <cg@zknt.org>
2024-03-12 16:11:50 +00:00
Date: Tue, 12 Mar 2024 17:09:52 +0100
2023-10-08 13:00:18 +00: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.
---
2024-03-12 16:11:50 +00:00
app/Services/Account/RemoteAuthService.php | 4 ++++
1 file changed, 4 insertions(+)
2023-10-08 13:00:18 +00:00
diff --git a/app/Services/Account/RemoteAuthService.php b/app/Services/Account/RemoteAuthService.php
2024-03-12 16:11:50 +00:00
index 4412352a..0c69959f 100644
2023-10-08 13:00:18 +00:00
--- a/app/Services/Account/RemoteAuthService.php
+++ b/app/Services/Account/RemoteAuthService.php
2024-03-12 16:11:50 +00:00
@@ -115,11 +115,13 @@ class RemoteAuthService
public static function isDomainCompatible($domain = false)
{
+ return true;
if(!$domain) {
return false;
2023-10-08 13:00:18 +00:00
}
return Cache::remember(self::CACHE_KEY . 'domain-compatible:' . $domain, 14400, function() use($domain) {
2024-01-24 12:20:14 +00:00
+ return true;
2023-10-08 13:00:18 +00:00
try {
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/domain?domain=' . $domain);
if(!$res->ok()) {
2024-03-12 16:11:50 +00:00
@@ -144,6 +146,7 @@ class RemoteAuthService
2023-10-08 13:00:18 +00:00
public static function lookupWebfingerUses($wf)
{
2024-01-24 12:20:14 +00:00
+ return 0;
2023-10-08 13:00:18 +00:00
try {
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/lookup?webfinger=' . $wf);
if(!$res->ok()) {
2024-03-12 16:11:50 +00:00
@@ -166,6 +169,7 @@ class RemoteAuthService
2023-10-08 13:00:18 +00:00
public static function submitToBeagle($ow, $ou, $dw, $du)
{
2024-01-24 12:20:14 +00:00
+ return;
2023-10-08 13:00:18 +00:00
try {
$url = 'https://beagle.pixelfed.net/api/v1/raa/submit';
$res = Http::throw()->timeout(10)->get($url, [
--
2024-03-12 16:11:50 +00:00
2.44.0
2023-10-08 13:00:18 +00:00