DKIM.verify() can throw nacl.exceptions.ValueError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dkimpy |
Fix Released
|
Medium
|
Scott Kitterman |
Bug Description
The following exception caught me by surprise:
File "/var/www/
valid = d.verify(idx=idx)
File "/usr/lib/
return self.verify_
File "/usr/lib/
self.pk, self.keysize, self.ktag, self.seqtlsrpt = load_pk_
File "/usr/lib/
pk, keysize, ktag, seqtlsrpt = evaluate_pk(name, s)
File "/usr/lib/
pk = nacl.signing.
File "/usr/lib/
raise exc.ValueError(
nacl.exceptions
The cause is an invalid ed25519 pubkey. I was expecting that DKIM.verify() either returns False or raises a DKIMException.
Is it suppposed to pass through exceptions from nacl?
Changed in dkimpy: | |
status: | Triaged → Fix Committed |
Changed in dkimpy: | |
status: | Fix Committed → Fix Released |
That should be caught as a dkim.KeyFormatE rror. Thanks.