summaryrefslogtreecommitdiff
path: root/internal/federation/federatingprotocol.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-11-10 17:16:58 +0100
committerLibravatar GitHub <noreply@github.com>2023-11-10 17:16:58 +0100
commit7ce3a1e6f3e9da43cd0a28f3018b8526decab698 (patch)
tree1b7b10513651d13b37ef188a50e3e9f9dc2c2030 /internal/federation/federatingprotocol.go
parent[bugfix/docs] Poll api fixups + swagger docs (#2345) (diff)
downloadgotosocial-7ce3a1e6f3e9da43cd0a28f3018b8526decab698.tar.xz
[bugfix] Don't try to update suspended accounts (#2348)
* [bugfix] Don't try to update suspended accounts * bail early if requesting account suspended
Diffstat (limited to 'internal/federation/federatingprotocol.go')
-rw-r--r--internal/federation/federatingprotocol.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/federation/federatingprotocol.go b/internal/federation/federatingprotocol.go
index 5a913dbbe..802a8b1dc 100644
--- a/internal/federation/federatingprotocol.go
+++ b/internal/federation/federatingprotocol.go
@@ -288,6 +288,13 @@ func (f *Federator) AuthenticatePostInbox(ctx context.Context, w http.ResponseWr
return nil, false, err
}
+ if !requestingAccount.SuspendedAt.IsZero() {
+ // Account was marked as suspended by a
+ // local admin action. Stop request early.
+ w.WriteHeader(http.StatusForbidden)
+ return ctx, false, nil
+ }
+
// We have everything we need now, set the requesting
// and receiving accounts on the context for later use.
ctx = gtscontext.SetRequestingAccount(ctx, requestingAccount)