account-pin-block-v2 #256
@ -747,7 +747,7 @@ func (h *Handlers) Authorize(ctx context.Context, sym string, input []byte) (res
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
err := h.countIncorrectPINAttempts(ctx, sessionId)
|
err := h.incrementIncorrectPINAttempts(ctx, sessionId)
|
||||||
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
@ -2124,8 +2124,8 @@ func (h *Handlers) UpdateAllProfileItems(ctx context.Context, sym string, input
|
|||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// countIncorrectPINAttempts keeps track of the number of incorrect PIN attempts
|
// incrementIncorrectPINAttempts keeps track of the number of incorrect PIN attempts
|
||||||
func (h *Handlers) countIncorrectPINAttempts(ctx context.Context, sessionId string) error {
|
func (h *Handlers) incrementIncorrectPINAttempts(ctx context.Context, sessionId string) error {
|
||||||
var pinAttemptsCount uint8
|
var pinAttemptsCount uint8
|
||||||
store := h.userdataStore
|
store := h.userdataStore
|
||||||
|
|
||||||
|
@ -2247,7 +2247,7 @@ func TestCountIncorrectPINAttempts(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Logf(err.Error())
|
t.Logf(err.Error())
|
||||||
}
|
}
|
||||||
err = h.countIncorrectPINAttempts(ctx, sessionId)
|
err = h.incrementIncorrectPINAttempts(ctx, sessionId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Logf(err.Error())
|
t.Logf(err.Error())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user
perhaps
increment
notcount
?