You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the #Age Check phase of rule output (main/rule_output.py#L95), the date or modified fields in the metadata[]may contain invalid dates and thereby cause a TypeError
File "/builds/group-a/yara/yara-forge/main/rule_output.py", line 107, in write_yara_packages
if (datetime.datetime.now() - rule_date).days > rule_package['max_age']:
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'NoneType'
The text was updated successfully, but these errors were encountered:
fixes issue YARAHQ#48 where a TypeError is caused when age-checking invalid metadata date fields.
To avoid errors caused by missing or improperly formatted dates in rule metadata, this commit ensures `rule_date` is not `None` before performing date calculations,
During the
#Age Check
phase of rule output (main/rule_output.py#L95
), thedate
ormodified
fields in themetadata[]
may contain invalid dates and thereby cause a TypeErrorThe text was updated successfully, but these errors were encountered: