- Fix unbound local variable error when processing signatures with an x
tag, but no t tag (LP: #1739637)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user