account-pin-block-v2 #256

Merged
lash merged 22 commits from account-pin-block-v2 into master 2025-01-08 13:30:39 +01:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 2ff9fed3c5 - Show all commits

View File

@ -747,7 +747,7 @@ func (h *Handlers) Authorize(ctx context.Context, sym string, input []byte) (res
}
}
} else {
err := h.countIncorrectPINAttempts(ctx, sessionId)
err := h.incrementIncorrectPINAttempts(ctx, sessionId)
if err != nil {
return res, err
}
@ -2124,8 +2124,8 @@ func (h *Handlers) UpdateAllProfileItems(ctx context.Context, sym string, input
return res, nil
}
// countIncorrectPINAttempts keeps track of the number of incorrect PIN attempts
func (h *Handlers) countIncorrectPINAttempts(ctx context.Context, sessionId string) error {
// incrementIncorrectPINAttempts keeps track of the number of incorrect PIN attempts
func (h *Handlers) incrementIncorrectPINAttempts(ctx context.Context, sessionId string) error {
var pinAttemptsCount uint8
store := h.userdataStore

View File

@ -2247,7 +2247,7 @@ func TestCountIncorrectPINAttempts(t *testing.T) {
if err != nil {
t.Logf(err.Error())
}
err = h.countIncorrectPINAttempts(ctx, sessionId)
err = h.incrementIncorrectPINAttempts(ctx, sessionId)
if err != nil {
t.Logf(err.Error())
}