From 42d8011ff4f10664a853c483685db8e97b7a3118 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Tue, 21 Nov 2023 10:35:30 +0000 Subject: [chore/security] refactor AuthenticateFederatedRequest() to handle account deref + suspension checks (#2371) * refactor AuthenticateFederatedRequest() to handle account suspension + fetching of owner * small fixups * small changes * revert to 'IsEitherBlocked' instead of just 'IsBlocked" :grimace: * update code comment to indicate that AuthenticateFederatedRequest() will handle account + instance dereferencing --- internal/processing/admin/domainkeysexpire.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'internal/processing/admin') diff --git a/internal/processing/admin/domainkeysexpire.go b/internal/processing/admin/domainkeysexpire.go index 886da8b2f..9853becbd 100644 --- a/internal/processing/admin/domainkeysexpire.go +++ b/internal/processing/admin/domainkeysexpire.go @@ -71,9 +71,7 @@ func (p *Processor) domainKeysExpireSideEffects(ctx context.Context, domain stri // the public key and update the account. if err := p.rangeDomainAccounts(ctx, domain, func(account *gtsmodel.Account) { account.PublicKeyExpiresAt = expiresAt - - if err := p.state.DB.UpdateAccount( - ctx, + if err := p.state.DB.UpdateAccount(ctx, account, "public_key_expires_at", ); err != nil { -- cgit v1.2.3