You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2016/11/11 22:28:32 UTC
[Bug 7369] New: Unescaped left brace in regex is deprecated
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7369
Bug ID: 7369
Summary: Unescaped left brace in regex is deprecated
Product: Spamassassin
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Libraries
Assignee: dev@spamassassin.apache.org
Reporter: alexchorny@gmail.com
Target Milestone: Undefined
This is new warning in 5.24 and in 5.26 it will be fatal error.
Unescaped left brace in regex is deprecated here, passed through in regex;
marked by <-- HERE in m/^(.{ <-- HERE ,200}).*$/ at
../blib/lib/Mail/SpamAssassin/PerMsgStatus.pm line 921.
See for ex.
http://www.cpantesters.org/cpan/report/2175cb2a-69fe-11e6-b500-799f71b19ea6
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7369] Unescaped left brace in regex is deprecated
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7369
Bill Cole <sa...@billmail.scconsult.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
CC| |sa-bugz-20080315@billmail.s
| |cconsult.com
Status|NEW |RESOLVED
--- Comment #7 from Bill Cole <sa...@billmail.scconsult.com> ---
Fixed in r1791013 for Bug #7404
*** This bug has been marked as a duplicate of bug 7404 ***
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7369] Unescaped left brace in regex is deprecated
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7369
--- Comment #2 from John Hardin <jh...@impsec.org> ---
Looks like it. The perlre documentation does not mention the {,n} quantifier
syntax, back as far as 5.12. I don't know when that change occurred, but it
looks like we need to clean up the code and potentially the rules to do
explicit {0,n} quantifiers, and post a warning on the users list for people to
review their local rules.
How many versions back do we fix this?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7369] Unescaped left brace in regex is deprecated
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7369
John Hardin <jh...@impsec.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jhardin@impsec.org
--- Comment #1 from John Hardin <jh...@impsec.org> ---
...so now you have to explicitly say ".{0,nnn}" for "0-n instances of"?
How many REs does this change break worldwide?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7369] Unescaped left brace in regex is deprecated
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7369
James Lee <li...@xdrv.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lista@xdrv.co.uk
--- Comment #6 from James Lee <li...@xdrv.co.uk> ---
(In reply to chorny from comment #3)
> Tested /a{,2}/ on perl 5.14.0. It does not work as /a{0,2}/. But it is same
> as /a\{,2\}/.
"does not work" is surely defined by the comment above the failed regex:
# in case the last line was huge, trim it back to around 200 chars
and "{,2}" does not work to trim the line in earlier version of perl either.
To trim the line to 200 chars "s/^(.{0,200}).*$/$1/gs" should be correct.
Any reason why something so basic has been left for 8 month? Is spamassassin
unmaintained?
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 /opt/xxxx/lib/perl5/xxxx/Mail/SpamAssassin/PerMsgStatus.pm line
921.
Note: and will be **fatal** in Perl 5.30
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7369] Unescaped left brace in regex is deprecated
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7369
--- Comment #4 from John Hardin <jh...@impsec.org> ---
...ugh. Is that sed I'm remembering then that supports the {,n} syntax?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7369] Unescaped left brace in regex is deprecated
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7369
Kevin A. McGrail <km...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |philip@abv.bg
--- Comment #8 from Kevin A. McGrail <km...@apache.org> ---
*** Bug 7576 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7369] Unescaped left brace in regex is deprecated
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7369
chorny <al...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alexchorny@gmail.com
--- Comment #3 from chorny <al...@gmail.com> ---
(In reply to John Hardin from comment #1)
> ...so now you have to explicitly say ".{0,nnn}" for "0-n instances of"?
Tested /a{,2}/ on perl 5.14.0. It does not work as /a{0,2}/. But it is same as
/a\{,2\}/.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7369] Unescaped left brace in regex is deprecated
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7369
Joe Quinn <jq...@pccc.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jquinn+SAbug@pccc.com
--- Comment #5 from Joe Quinn <jq...@pccc.com> ---
$ grep --recursive '{,' lib/
lib/Mail/SpamAssassin/PerMsgStatus.pm: $str =~ s/^(.{,200}).*$/$1/gs;
Looks like this is the only regex that is affected.
--
You are receiving this mail because:
You are the assignee for the bug.