mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-07 16:14:01 +02:00
Explicit check for signature length before verifying to avoid exception
This commit is contained in:
parent
5730ad184c
commit
d4a382ed2f
1 changed files with 3 additions and 0 deletions
|
@ -185,6 +185,9 @@ class DesfireEd25519Authenthicator(object):
|
|||
|
||||
try:
|
||||
ndefSignature = self.nfcReader.readDesfireNDEF()
|
||||
if len(ndefSignature) != 64:
|
||||
logging.error("NDEF signature has wrong length")
|
||||
return None
|
||||
if self.signatureCheck(uid_hex.decode("hex"), ndefSignature):
|
||||
return UidRecord(uid_hex, nick)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue