1 parent
d93337852d
commit
dbcfc5c461
6 files changed
+36
-16
No files matched your search
@@ -326,6 +326,13 @@ func (s *Service) CompleteWithContext(ticketID, newPassword, browserContext stri
|
||||
return ErrRecoveryDenied
|
||||
}
|
||||
}
|
||||
if item.Method == "webauthn" && item.CredentialID > 0 {
|
||||
var credential models.WebAuthnCredential
|
||||
found, lookupErr := s.engine.Where("id = ? AND user_id = ? AND revoked_at IS NULL", item.CredentialID, item.UserID).Get(&credential)
|
||||
if lookupErr != nil || !found {
|
||||
return ErrRecoveryDenied
|
||||
}
|
||||
}
|
||||
version := user.SessionVersion + 1
|
||||
if version <= 0 {
|
||||
version = 1
|
||||
|
||||
Reference in new issue
Block a user