mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 22:08:01 +08:00
FIX: Catch error when unknown COSE algorithm is supplied for Security Key (#8649)
Added a fix to gracefully error with a Webauthn::SecurityKeyError if somehow a user provides an unkown COSE algorithm when logging in with a security key. If `COSE::Algorithm.find` returns nil we now fail gracefully and log the algorithm used along with the user ID and the security key params for debugging, as this will help us find other common algorithms to implement for webauthn
This commit is contained in:
@ -26,4 +26,5 @@ module Webauthn
|
||||
class NotFoundError < SecurityKeyError; end
|
||||
class OwnershipError < SecurityKeyError; end
|
||||
class PublicKeyError < SecurityKeyError; end
|
||||
class UnknownCOSEAlgorithmError < SecurityKeyError; end
|
||||
end
|
||||
|
Reference in New Issue
Block a user