This commit is contained in:
parent
0de7e5773a
commit
cae63b8575
6 changed files with 58 additions and 33 deletions
|
@ -1,6 +1,6 @@
|
|||
From 39b4d1f323e3bed9e2381e04b2dad8ac691f69dc Mon Sep 17 00:00:00 2001
|
||||
From 48a103b02fcef4a950e3f72141c49ae1ce92ef8c Mon Sep 17 00:00:00 2001
|
||||
From: chris <cg@zknt.org>
|
||||
Date: Sun, 14 Jul 2024 11:06:12 +0200
|
||||
Date: Sun, 6 Oct 2024 16:04:35 +0200
|
||||
Subject: [PATCH 1/6] remove IP logging
|
||||
|
||||
Replace unneeded logging of IPs and User-Agent strings with hashed data.
|
||||
|
@ -38,10 +38,10 @@ index 25c1b1b6..00000000
|
|||
-public/img/* binary -diff
|
||||
-public/fonts/* binary -diff
|
||||
diff --git a/app/Http/Controllers/Api/ApiV1Dot1Controller.php b/app/Http/Controllers/Api/ApiV1Dot1Controller.php
|
||||
index 9a47bb15..0bd5b482 100644
|
||||
index 31c2e866..3037be11 100644
|
||||
--- a/app/Http/Controllers/Api/ApiV1Dot1Controller.php
|
||||
+++ b/app/Http/Controllers/Api/ApiV1Dot1Controller.php
|
||||
@@ -283,8 +283,8 @@ class ApiV1Dot1Controller extends Controller
|
||||
@@ -295,8 +295,8 @@ class ApiV1Dot1Controller extends Controller
|
||||
$log->action = 'account.edit.password';
|
||||
$log->message = 'Password changed';
|
||||
$log->link = null;
|
||||
|
@ -52,16 +52,16 @@ index 9a47bb15..0bd5b482 100644
|
|||
$log->save();
|
||||
|
||||
Mail::to($request->user())->send(new PasswordChange($user));
|
||||
@@ -308,7 +308,7 @@ class ApiV1Dot1Controller extends Controller
|
||||
@@ -320,7 +320,7 @@ class ApiV1Dot1Controller extends Controller
|
||||
abort_if(BouncerService::checkIp($request->ip()), 404);
|
||||
}
|
||||
$agent = new Agent();
|
||||
$agent = new Agent;
|
||||
- $currentIp = $request->ip();
|
||||
+ $currentIp = sha1($request->ip());
|
||||
|
||||
$activity = AccountLog::whereUserId($user->id)
|
||||
->whereAction('auth.login')
|
||||
@@ -487,7 +487,7 @@ class ApiV1Dot1Controller extends Controller
|
||||
@@ -499,7 +499,7 @@ class ApiV1Dot1Controller extends Controller
|
||||
abort_if(BouncerService::checkIp($request->ip()), 404);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ index 9a47bb15..0bd5b482 100644
|
|||
abort_if(! $rl, 400, 'Too many requests');
|
||||
|
||||
$this->validate($request, [
|
||||
@@ -559,7 +559,7 @@ class ApiV1Dot1Controller extends Controller
|
||||
@@ -571,7 +571,7 @@ class ApiV1Dot1Controller extends Controller
|
||||
$user->email = $email;
|
||||
$user->password = Hash::make($password);
|
||||
$user->register_source = 'app';
|
||||
|
@ -79,7 +79,7 @@ index 9a47bb15..0bd5b482 100644
|
|||
$user->app_register_token = Str::random(40);
|
||||
$user->save();
|
||||
|
||||
@@ -617,7 +617,7 @@ class ApiV1Dot1Controller extends Controller
|
||||
@@ -629,7 +629,7 @@ class ApiV1Dot1Controller extends Controller
|
||||
abort_if(BouncerService::checkIp($request->ip()), 404);
|
||||
}
|
||||
|
||||
|
@ -238,5 +238,5 @@ index c6ba3305..eff0cf71 100644
|
|||
}
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
2.44.1
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From 796abe4146b83b50633e3881cdfa0ddfa2f83202 Mon Sep 17 00:00:00 2001
|
||||
From a3fa9b01c902e35674c912182505b321f62c5ea0 Mon Sep 17 00:00:00 2001
|
||||
From: chris <cg@zknt.org>
|
||||
Date: Sun, 14 Jul 2024 11:08:37 +0200
|
||||
Date: Sun, 6 Oct 2024 16:05:30 +0200
|
||||
Subject: [PATCH 2/6] hardcode discovery settings
|
||||
|
||||
force enable discovery (as dynamic settings are not saved properly)
|
||||
|
@ -34,5 +34,5 @@ index b3047ff7..824e0308 100644
|
|||
'server' => [
|
||||
'enabled' => false,
|
||||
--
|
||||
2.45.2
|
||||
2.44.1
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From 90df0d4ccc81b1ad2e0d1a14ba9edd85237feeb4 Mon Sep 17 00:00:00 2001
|
||||
From 8f2b8743a370ef6cd9c0311eed5c9eb5b876bdad Mon Sep 17 00:00:00 2001
|
||||
From: chris <cg@zknt.org>
|
||||
Date: Sun, 14 Jul 2024 11:09:11 +0200
|
||||
Date: Sun, 6 Oct 2024 16:05:56 +0200
|
||||
Subject: [PATCH 3/6] point to modified sourcecode
|
||||
|
||||
as per AGPL license of original source, modifications must be disclosed.
|
||||
|
@ -22,5 +22,5 @@ index cb2e7c77..63645f0c 100644
|
|||
@endsection
|
||||
|
||||
--
|
||||
2.45.2
|
||||
2.44.1
|
||||
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
From ebf5c9052746eba97ee6c9abefb2e355b54c2bf7 Mon Sep 17 00:00:00 2001
|
||||
From cc6dccd3513ab3b77dcbf45bac20cc6904545245 Mon Sep 17 00:00:00 2001
|
||||
From: chris <cg@zknt.org>
|
||||
Date: Sun, 14 Jul 2024 11:09:42 +0200
|
||||
Subject: [PATCH 4/6] disable beagle service
|
||||
Date: Sun, 6 Oct 2024 16:11:33 +0200
|
||||
Subject: [PATCH 6/6] disable beagle and push 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 of user data with beagle.
|
||||
---
|
||||
app/Services/Account/RemoteAuthService.php | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
config/instance.php | 2 +-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/Services/Account/RemoteAuthService.php b/app/Services/Account/RemoteAuthService.php
|
||||
index 4412352a..abab2151 100644
|
||||
|
@ -38,6 +39,19 @@ index 4412352a..abab2151 100644
|
|||
try {
|
||||
$url = 'https://beagle.pixelfed.net/api/v1/raa/submit';
|
||||
$res = Http::throw()->timeout(10)->get($url, [
|
||||
diff --git a/config/instance.php b/config/instance.php
|
||||
index 18d88787..2b7cb8b9 100644
|
||||
--- a/config/instance.php
|
||||
+++ b/config/instance.php
|
||||
@@ -156,7 +156,7 @@ return [
|
||||
'nag' => [
|
||||
'enabled' => (bool) env('INSTANCE_NOTIFY_APP_GATEWAY', true),
|
||||
'api_key' => env('PIXELFED_PUSHGATEWAY_KEY', false),
|
||||
- 'endpoint' => 'push.pixelfed.net',
|
||||
+ 'endpoint' => 'localhost',
|
||||
],
|
||||
],
|
||||
|
||||
--
|
||||
2.45.2
|
||||
2.44.1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 6cf238c78b05243d8ddcdfa7ed7d08ba2292efd5 Mon Sep 17 00:00:00 2001
|
||||
From dfa3f018cd2669820f92a72d0e4059ff29d46b1a Mon Sep 17 00:00:00 2001
|
||||
From: chris <cg@zknt.org>
|
||||
Date: Sun, 14 Jul 2024 11:10:36 +0200
|
||||
Subject: [PATCH 5/6] allow 30 char usernames
|
||||
Date: Sun, 6 Oct 2024 16:06:24 +0200
|
||||
Subject: [PATCH 4/6] allow 30 char usernames
|
||||
|
||||
raise maximum username length, because why not?
|
||||
---
|
||||
|
@ -22,5 +22,5 @@ index 1d0e415c..3150ddba 100644
|
|||
function ($attribute, $value, $fail) {
|
||||
$dash = substr_count($value, '-');
|
||||
--
|
||||
2.45.2
|
||||
2.44.1
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue