Thread View: news.software.readers
7 messages
7 total messages
Started by Adam Funk
Mon, 29 Nov 2010 16:48
bug in /usr/share/slrn/contrib/cleanscore
Author: Adam Funk
Date: Mon, 29 Nov 2010 16:48
Date: Mon, 29 Nov 2010 16:48
25 lines
1681 bytes
1681 bytes
I've found a bug in the cleanscore Perl program that comes with slrn;
basically, if a rule includes the string "Expires:" after the header
[1], the %this_entry values around line 250 are uninstantiated, so the
script wants to delete the stanza regardless of the date on the line
that begins with "Expires:". AFAICT, the fix is as follows:
#v+
$ diff /usr/share/slrn/contrib/cleanscore bin/cleanscore
234c234
< if (/Expires:/i)
---
> if (/^Expires:/i)
#v-
[1] for example:
Subject: How to insert Expires: header
--
And remember, while you're out there risking your life and limb
through shot and shell, we'll be in be in here thinking what a
sucker you are. [Rufus T. Firefly]
Re: bug in /usr/share/slrn/contrib/cleanscore
Author: Ignatios Souvatzis
Date: Fri, 10 Dec 2010 11:06
Date: Fri, 10 Dec 2010 11:06
25 lines
1959 bytes
1959 bytes
On 2010-11-29, Adam Funk <a24061@ducksburg.com> wrote: > I've found a bug in the cleanscore Perl program that comes with slrn; > basically, if a rule includes the string "Expires:" after the header > [1], the %this_entry values around line 250 are uninstantiated, so the > script wants to delete the stanza regardless of the date on the line > that begins with "Expires:". AFAICT, the fix is as follows: > > > #v+ > $ diff /usr/share/slrn/contrib/cleanscore bin/cleanscore > 234c234 > < if (/Expires:/i) > --- > > if (/^Expires:/i) > #v- > > > > [1] for example: > Subject: How to insert Expires: header While I agree that this should be anchored at line start... what about the if (/Scores:/i) and the if (/\#EOF... and friends in the same loop? -is
Re: bug in /usr/share/slrn/contrib/cleanscore
Author: Ignatios Souvatzis
Date: Fri, 10 Dec 2010 11:35
Date: Fri, 10 Dec 2010 11:35
35 lines
2406 bytes
2406 bytes
Ignatios Souvatzis wrote: > On 2010-11-29, Adam Funk <a24061@ducksburg.com> wrote: >> I've found a bug in the cleanscore Perl program that comes with slrn; >> basically, if a rule includes the string "Expires:" after the header >> [1], the %this_entry values around line 250 are uninstantiated, so the >> script wants to delete the stanza regardless of the date on the line >> that begins with "Expires:". AFAICT, the fix is as follows: >> >> >> #v+ >> $ diff /usr/share/slrn/contrib/cleanscore bin/cleanscore >> 234c234 >> < if (/Expires:/i) >> --- >> > if (/^Expires:/i) >> #v- >> >> >> >> [1] for example: >> Subject: How to insert Expires: header > > While I agree that this should be anchored at line start... what about > the if (/Scores:/i) and the if (/\#EOF... and friends in the same loop? Actually, /^Expires is wrong. According to scores.txt, whitespace is allowed before the keywords. I'd suggest something like if (/^[ ]*Expires:/i) (that is: [ space tab ] ), but have to check whether slang regular expressions use that syntax. -is -- seal your e-mail: http://www.gnupg.org/
Re: bug in /usr/share/slrn/contrib/cleanscore
Author: Adam Funk
Date: Fri, 10 Dec 2010 13:37
Date: Fri, 10 Dec 2010 13:37
50 lines
2824 bytes
2824 bytes
On 2010-12-10, Ignatios Souvatzis wrote: > Ignatios Souvatzis wrote: >> On 2010-11-29, Adam Funk <a24061@ducksburg.com> wrote: >>> I've found a bug in the cleanscore Perl program that comes with slrn; >>> basically, if a rule includes the string "Expires:" after the header >>> [1], the %this_entry values around line 250 are uninstantiated, so the >>> script wants to delete the stanza regardless of the date on the line >>> that begins with "Expires:". AFAICT, the fix is as follows: >>> >>> >>> #v+ >>> $ diff /usr/share/slrn/contrib/cleanscore bin/cleanscore >>> 234c234 >>> < if (/Expires:/i) >>> --- >>> > if (/^Expires:/i) >>> #v- >>> >>> >>> >>> [1] for example: >>> Subject: How to insert Expires: header >> >> While I agree that this should be anchored at line start... what about >> the if (/Scores:/i) and the if (/\#EOF... and friends in the same loop? They should probably be fixed too! I just haven't come across any rules containing those strings in my own scorefile yet. > Actually, /^Expires is wrong. According to scores.txt, whitespace is > allowed before the keywords. I'd suggest something like > > if (/^[ ]*Expires:/i) (that is: [ space tab ] ), but have to > check whether slang regular expressions use that syntax. How about #v+ if (/^\s*Expires:/i) #v- (The cleanscore program is written in Perl, where \s matches any whitespace character.) -- Nam Sibbyllam quidem Cumis ego ipse oculis meis vidi in ampulla pendere, et cum illi pueri dicerent: beable beable beable; respondebat illa: doidy doidy doidy. [plorkwort]
Re: bug in /usr/share/slrn/contrib/cleanscore
Author: Ignatios Souvatzis
Date: Fri, 10 Dec 2010 14:14
Date: Fri, 10 Dec 2010 14:14
27 lines
2127 bytes
2127 bytes
Adam Funk wrote: > On 2010-12-10, Ignatios Souvatzis wrote: ... >>> While I agree that this should be anchored at line start... what about >>> the if (/Scores:/i) and the if (/\#EOF... and friends in the same loop? > > They should probably be fixed too! I just haven't come across any > rules containing those strings in my own scorefile yet. > > >> Actually, /^Expires is wrong. According to scores.txt, whitespace is >> allowed before the keywords. I'd suggest something like >> >> if (/^[ ]*Expires:/i) (that is: [ space tab ] ), but have to >> check whether slang regular expressions use that syntax. > > How about > #v+ > if (/^\s*Expires:/i) > #v- > > (The cleanscore program is written in Perl, where \s matches any > whitespace character.) Ugh. My fault, yes, cleanscore is not written in slang. :-) -is
Re: bug in /usr/share/slrn/contrib/cleanscore
Author: Shmuel Metz
Date: Sun, 12 Dec 2010 03:49
Date: Sun, 12 Dec 2010 03:49
17 lines
2780 bytes
2780 bytes
In <slrnig443f.bhi.u502sou@marie.beverly.kleinbus.org>, on 12/10/2010 at 12:35 PM, Ignatios Souvatzis <u502sou@beverly.kleinbus.org> said: >Actually, /^Expires is wrong. According to scores.txt, whitespace is >allowed before the keywords. That's not how header fields are defined in RFC 1036 et al. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the right to publicly post or ridicule any abusive E-mail. Reply to domain Patriot dot net user shmuel+news to contact me. Do not reply to spamtrap@library.lspace.org
Re: bug in /usr/share/slrn/contrib/cleanscore
Author: Adam Funk
Date: Fri, 14 Jan 2011 12:47
Date: Fri, 14 Jan 2011 12:47
22 lines
1993 bytes
1993 bytes
On 2010-12-12, Shmuel Metz wrote:
> In <slrnig443f.bhi.u502sou@marie.beverly.kleinbus.org>, on 12/10/2010
> at 12:35 PM, Ignatios Souvatzis <u502sou@beverly.kleinbus.org>
> said:
>
>>Actually, /^Expires is wrong. According to scores.txt, whitespace is
>>allowed before the keywords.
>
> That's not how header fields are defined in RFC 1036 et al.
Ignatios was talking about the syntax of the Expires: line in a slrn
score file, not the Expires: header in a message ... although we were
talking about lines in slrn score files that have the string
'Expires:' in them and make the cleanscore program misbehave.
--
When you look at a photograph of the earth you don't see any
borders. That realization is where our hope as a planet lies.
[Graham Nash]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads