mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:32:26 -05:00
[bugfix] Don't try to update suspended accounts (#2348)
* [bugfix] Don't try to update suspended accounts * bail early if requesting account suspended
This commit is contained in:
parent
42a19cf390
commit
7ce3a1e6f3
4 changed files with 33 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue