Bug 6894 - INVALID_DATE Problematic Regression Test
Summary: INVALID_DATE Problematic Regression Test
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Rules (show other bugs)
Version: 3.4 SVN branch
Hardware: PC Windows 7
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-22 02:25 UTC by Kevin A. McGrail
Modified: 2018-02-24 00:38 UTC (History)
2 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin A. McGrail 2013-01-22 02:25:32 UTC
In rules/20_head_tests.cf, there is a regression test that I have commented.

#test INVALID_DATE ok      Sat, 31 Dec 2005 23:00:00 

prove t/rule_tests.t works with the 3 other INVALID_DATE tests in the same file but this one is not correct.

Can someone look at the rule and the test case, please?

Regards,
KAM
Comment 1 Mark Martinec 2013-02-28 18:05:15 UTC
> In rules/20_head_tests.cf, there is a regression test that I have commented.
>   #test INVALID_DATE ok      Sat, 31 Dec 2005 23:00:00 
> prove t/rule_tests.t works with the 3 other INVALID_DATE tests in the same
> file but this one is not correct.
> Can someone look at the rule and the test case, please?


Theo made a time zone optional, thus making 'Sat, 31 Dec 2005 23:00:00' valid:

  r553740 | felicity | 2007-07-06 07:29:26 +0200 (Fri, 06 Jul 2007) | 1 line
  promote new INVALID_DATE, make test rules specifically test rules,
  update the new mime epilogue/etc rules to be more efficient.

According to RFC 5322 the time zone is a required field, so the rule
seems to be too permissive.
Comment 2 Giovanni Bechis 2017-12-20 08:00:52 UTC
As per rfc 5322 which obsoletes rfc 2822, time zone is not optional.
The test should be removed or should be:
---------------------------------------------------------
test INVALID_DATE fail      Sat, 31 Dec 2005 23:00:00
---------------------------------------------------------
Comment 3 Giovanni Bechis 2018-02-24 00:38:24 UTC
Test fixed in r1825184.