Skip to content

Commit

Permalink
Require all auth data to be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterKale committed Mar 31, 2022
1 parent ad90c8a commit 27d7469
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webauthn/helpers/parse_authenticator_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,10 @@ def parse_authenticator_data(val: bytes) -> AuthenticatorData:
pointer += len(extension_bytes)
authenticator_data.extensions = extension_bytes

# We should have parsed all authenticator data by this point
if (len(val) > pointer):
raise InvalidAuthenticatorDataStructure(
"Leftover bytes detected while parsing authenticator data"
)

return authenticator_data

0 comments on commit 27d7469

Please sign in to comment.