UnboundLocalError: local variable 'now' referenced before assignment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dkimpy |
Fix Released
|
High
|
Scott Kitterman |
Bug Description
Running the dkim.verify() code, I got the following exception on some cases:
File "/var/www/
return d.verify(
File "/var/www/
validate_
File "/var/www/
if x_sign < now - slop: │
UnboundLocalError: local variable 'now' referenced before assignment
Changed in dkimpy: | |
importance: | Undecided → High |
status: | New → Triaged |
assignee: | nobody → Scott Kitterman (kitterman) |
milestone: | none → 0.7.0 |
Changed in dkimpy: | |
status: | Triaged → Fix Committed |
Thanks. I see the problem.
'now' is set when the t= Signature Timestamp signature tag is parsed and then used when the x= Signature Expiration tag is parsed and evaluated as well.