[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-anubis] GNU Anubis 4.0 released.
From: |
Sergey Poznyakoff |
Subject: |
Re: [bug-anubis] GNU Anubis 4.0 released. |
Date: |
Sat, 01 Jan 2005 14:14:44 +0200 |
Paolo <address@hidden> wrote:
>
> modify body :perl ["[[:blank:]]*X-Anomy.*"] ""
>
> but anubis crashes on it - I get
While admitting that dumping core on incorrect input is bad behaviour[1] I
must say thet the above regexp is definitely incorrect. In accordance
with pcre manpage:
The supported class names are
alnum letters and digits
alpha letters
ascii character codes 0 - 127
cntrl control characters
digit decimal
digits (same as \d)
graph printing characters, excluding space
lower lower case letters
print printing characters, including space
punct printing characters, excluding letters and dig-
its
space white space (same as \s)
upper upper case letters
word "word" characters (same as \w)
xdigit hexadecimal digits
Refer to `man pcre' for more info.
> does what's expected. I tried '["\s*X-Anomy.*"]' as well, this time anubis
[...]
> modify body :extended ["[[:blank:]]*X-Anomy.*"] ""
> modify body :basic ["[[:blank:]]*X-Anomy.*"] ""
Any of these regexp do their work as expected. Sending the following
message
--cut here---
From: Paolo <address@hidden>
To: Sergey Poznyakoff <address@hidden>
Subject: \s test
Text
Test 1
X-Anomyzation 3
Test 2
--cut here---
through any of them I receive
--cut here---
From: Paolo <address@hidden>
To: Sergey Poznyakoff <address@hidden>
Subject: \s test
Text
Test 1
Test 2
--cut here---
As you see, 'X-Anomy.*' line got deleted.
Regards,
Sergey
[1] The following patch fixes the coredump:
Index: src/rcfile.y
===================================================================
RCS file: /cvsroot/anubis/anubis/src/rcfile.y,v
retrieving revision 1.36
diff -p -u -r1.36 rcfile.y
--- src/rcfile.y 17 Sep 2004 14:57:11 -0000 1.36
+++ src/rcfile.y 1 Jan 2005 12:02:17 -0000
@@ -366,6 +366,11 @@ regex : modlist '[' string ']'
{
$$ = anubis_regex_compile ($3, $1);
free ($3);
+ if (!$$)
+ {
+ parse_error (_("Invalid regular expression (see the above
message)"));
+ YYERROR;
+ }
}
;
- Re: [bug-anubis] GNU Anubis 4.0 released.,
Sergey Poznyakoff <=
- Re: [bug-anubis] GNU Anubis 4.0 released., Paolo, 2005/01/01
- Re: [bug-anubis] GNU Anubis 4.0 released., Sergey Poznyakoff, 2005/01/01
- Re: [bug-anubis] GNU Anubis 4.0 released., Paolo, 2005/01/01
- Message not available
- Re: [bug-anubis] GNU Anubis 4.0 released., Paolo, 2005/01/02
- Re: [bug-anubis] GNU Anubis 4.0 released., Sergey Poznyakoff, 2005/01/02
- Re: [bug-anubis] GNU Anubis 4.0 released., Paolo, 2005/01/02
- Re: [bug-anubis] GNU Anubis 4.0 released., Sergey Poznyakoff, 2005/01/02
- Re: [bug-anubis] GNU Anubis 4.0 released., Sergey Poznyakoff, 2005/01/02