fix: protect publish path from mysql exhaustion

This commit is contained in:
richjohnrambo
2026-09-27 18:35:54 +08:00
parent 36eb76a5e3
commit 3bb6774786
17 changed files with 308 additions and 21 deletions
+2
View File
@@ -272,6 +272,7 @@ type testSecurityStore struct {
consumedTarget string
independentPassword *types.IndependentPassword
youthMode *types.YouthModeSettings
youthModeReads int
attempts int
lockedUntil *time.Time
notifications []types.SystemNotification
@@ -379,6 +380,7 @@ func (s *testSecurityStore) UpdateIndependentPasswordAttempts(_ types.TenantID,
}
func (s *testSecurityStore) GetYouthMode(_ types.TenantID, uid types.Uid) (*types.YouthModeSettings, error) {
s.youthModeReads++
if s.err != nil {
return nil, s.err
}