- Fix unbound local variable error when processing signatures with an x

tag, but no t tag (LP: #1739637)
This commit is contained in:
Scott Kitterman
2017-12-21 16:35:42 -05:00
parent 6b80254bd9
commit 10e12c60d8
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -16,6 +16,8 @@ UNRELEASED Version 0.7.0
correct when the optional k= tag is not present in the DKIM public key
record
- Fix -v verbose reporting in dkimverify.py
- Fix unbound local variable error when processing signatures with an x
tag, but no t tag (LP: #1739637)
2017-05-30 Version 0.6.2
- Fixed problem with header folding that caused the first line to be
+2
View File
@@ -260,6 +260,8 @@ def validate_signature_fields(sig, mandatory_fields=[b'v', b'a', b'b', b'bh', b'
raise ValidationError(
"x= value is not a decimal integer (%s)" % sig[b'x'])
x_sign = int(sig[b'x'])
now = int(time.time())
slop = 36000 # 10H leeway for mailers with inaccurate clocks
if x_sign < now - slop:
raise ValidationError(
"x= value is past (%s)" % sig[b'x'])