Bug 7404 - Bad regexp (and logic) in MS::PerMsgStatus::get_content_preview
Summary: Bad regexp (and logic) in MS::PerMsgStatus::get_content_preview
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 3.4.1
Hardware: PC All
: P2 normal
Target Milestone: 3.4.2
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
: 7369 7444 7448 7480 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-04-11 18:30 UTC by Mark Martinec
Modified: 2018-01-11 14:53 UTC (History)
4 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Fixes inappropriate regexp (and surrounding logic) patch None Mark Martinec [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Martinec 2017-04-11 18:30:26 UTC
t/autolearn.t ..................... Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.{ <-- HERE ,200}).*$/ at ../blib/lib/Mail/SpamAssassin/PerMsgStatus.pm line 923.

perl 5.25.11
Comment 1 Mark Martinec 2017-04-11 18:37:55 UTC
(sorry for hitting a submit prematurely on an unfinished PR)

Testing with 5.25.11 (soon to be be released as 5.26) fills the log
with warnings on a suspicious regexp, as shown above - an x{,n}
is not interpreted as x{0,n}, and even if it were, the logic is wrong
in that code.

fixing in trunk:
  Sending lib/Mail/SpamAssassin/PerMsgStatus.pm
Committed revision 1791010.
Comment 2 Mark Martinec 2017-04-11 18:39:25 UTC
Created attachment 5441 [details]
Fixes inappropriate regexp (and surrounding logic)
Comment 3 Mark Martinec 2017-04-11 18:56:48 UTC
3.4:
  Sending PerMsgStatus.pm
Committed revision 1791013.
Comment 4 Mark Martinec 2017-04-12 09:33:36 UTC
closing, resolved
Comment 5 Bill Cole 2017-07-05 02:26:05 UTC
*** Bug 7369 has been marked as a duplicate of this bug. ***
Comment 6 Bill Cole 2017-07-05 14:15:18 UTC
*** Bug 7444 has been marked as a duplicate of this bug. ***
Comment 7 Kevin A. McGrail 2017-08-09 21:02:05 UTC
*** Bug 7448 has been marked as a duplicate of this bug. ***
Comment 8 Bill Cole 2018-01-11 14:53:51 UTC
*** Bug 7480 has been marked as a duplicate of this bug. ***