Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

<james> abuse me. I'm so lame I sent a bug report to debian-devel-changes -- Seen on #Debian


computers / news.software.nntp / Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

SubjectAuthor
* Seeking help modifying Diablo source to prevent miscategorization of articles coJesse Rehmer
`* Re: Seeking help modifying Diablo source to prevent miscategorization ofRetro Guy
 `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleJesse Rehmer
  `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleJesse Rehmer
   `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleJesse Rehmer
    `* Re: Seeking help modifying Diablo source to preventTom Furie
     `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleJesse Rehmer
      `* Re: Seeking help modifying Diablo source to preventTom Furie
       `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleJesse Rehmer
        `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleJesse Rehmer
         +* Re: Seeking help modifying Diablo source to prevent miscategorization of articleRuss Allbery
         |`* Re: Seeking help modifying Diablo source to prevent miscategorization of articleJesse Rehmer
         | `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleRuss Allbery
         |  `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleJesse Rehmer
         |   `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleRuss Allbery
         |    `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleJesse Rehmer
         |     `* Re: Seeking help modifying Diablo source to prevent miscategorization of articleRuss Allbery
         |      `- Re: Seeking help modifying Diablo source to prevent miscategorization of articleJesse Rehmer
         `- Re: Seeking help modifying Diablo source to prevent miscategorization of articleUrs Janßen

1
Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1529&group=news.software.nntp#1529

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!diablo1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 00:50:54 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 20 Mar 2023 00:50:54 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="95542"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:6R7hyXLQLlNXRX0Ltb3QGZsyycg= sha256:86CwCa5TmkijRT8T/RDcKtelrboQ4/kRxo6Dojj2S7c=
sha1:ciqii6esSVnM1B+kNdT9uzW/ccY= sha256:7zw2Mtmt3GTKHpyRpLrLNgnxhFbbyEmHcXkInzu1fVk=
X-Usenapp: v1.26.3/d - Full License
 by: Jesse Rehmer - Mon, 20 Mar 2023 00:50 UTC

I recently switched to Diablo on the transit layer, but am observing it is
rejecting messages that contain PGP as binary articles. This is preventing
valid messages, such as NoCeM notices and messages that aren't encrypted but
contain a PGP Signature, to be rejected in some cases, or not propagated to
peers (due to "arttypes !binary" in the dnewsfeed definition).

In lib/arttype.c, I see there is a specific check to identify an article with
an article type of pgp, but this only checks for "-----BEGIN PGP
MESSAGE-----".

Looking at the contents of articles I am rejecting or not propagating, I
believe the check should also look the following:

"-----BEGIN PGP SIGNED MESSAGE-----"
and
"-----BEGIN PGP SIGNATURE-----"

but I am not a developer and can't quite cobble anything together from the
existing code that works to add these additional values.

If anyone out there is willing to help me with a patch, I will be forever
grateful!

This is the portion of lib/arttype.c that is causing the misidentification:

/*
* We look for binary formats first, since these eat
* up CPU like there is no tomorrow. We may miss
* some flags if we detect a binary file, the
* alternative is to remove the return(Type)'s and
* eat CPU for the entire binary.
*/

linetype = classifyLineAsTypes(ptr, len);

if (linetype & UUE) {
Base64 = 0;
BinHex = 0;
UUencode++;
if (UUencode > 8) {
Type |= ARTTYPE_UUENCODE | ARTTYPE_BINARY;
return(Type);
}
} else if (linetype & BHX) {
UUencode = 0;
Base64 = 0;
BinHex++;
if (BinHex > 8) {
Type |= ARTTYPE_BINHEX | ARTTYPE_BINARY;
return(Type);
}
} else if (linetype & B64) {
UUencode = 0;
BinHex = 0;
Base64++;
if (Base64 > 8) {
Type |= ARTTYPE_BASE64 | ARTTYPE_BINARY;
return(Type);
}
} else {
if (*ptr == '-' &&
strncmp(ptr, "-----BEGIN PGP MESSAGE-----", 27) == 0)
Type |= ARTTYPE_PGPMESSAGE;
UUencode = 0;
Base64 = 0;
BinHex = 0;
}
}

Warm Regards,

Jesse Rehmer

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<9e316a26602e6764c6f722dc5c002594@news.novabbs.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1530&group=news.software.nntp#1530

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!.POSTED.novabbs-org!not-for-mail
From: retro.guy@rocksolidbbs.com (Retro Guy)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of
articles containing PGP
Date: Mon, 20 Mar 2023 01:30:32 +0000
Organization: Rocksolid Light
Message-ID: <9e316a26602e6764c6f722dc5c002594@news.novabbs.org>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.i2pn2.org; posting-account="novabbs.org"; posting-host="novabbs-org:10.136.143.187";
logging-data="27382"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light 0.7.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.org
X-Rslight-Site: $2y$10$5VF7ay7BtPqYt3qKyFP83eezPhSIiBorEOdTmJdpYDLGD6BmrMgPi
X-Rslight-Posting-User: 91053d4a47d51b416144568e5a1040f05e31ed1b
X-Face: .&YR-G(w(DZ$$,}%k=]*5*!p'=(anr"IT`wZG'2VWdfl\r)l[42u7JH`n(JUQ*e5*A|XCDf
?&\X&uwkl38"CYX3O8m}C8E4p'%N$2#kSTVzx{Ly|DjLT\Vk7NE}NQ(VC$Yq]i:7|z[.9iv^g>*8_B
H0=hZt'[%)4kG|
 by: Retro Guy - Mon, 20 Mar 2023 01:30 UTC

Jesse Rehmer wrote:

> I recently switched to Diablo on the transit layer, but am observing it is
> rejecting messages that contain PGP as binary articles. This is preventing
> valid messages, such as NoCeM notices and messages that aren't encrypted but
> contain a PGP Signature, to be rejected in some cases, or not propagated to
> peers (due to "arttypes !binary" in the dnewsfeed definition).

> In lib/arttype.c, I see there is a specific check to identify an article with
> an article type of pgp, but this only checks for "-----BEGIN PGP
> MESSAGE-----".

> Looking at the contents of articles I am rejecting or not propagating, I
> believe the check should also look the following:

> "-----BEGIN PGP SIGNED MESSAGE-----"
> and
> "-----BEGIN PGP SIGNATURE-----"

> but I am not a developer and can't quite cobble anything together from the
> existing code that works to add these additional values.

> If anyone out there is willing to help me with a patch, I will be forever
> grateful!

> This is the portion of lib/arttype.c that is causing the misidentification:

> /*
> * We look for binary formats first, since these eat
> * up CPU like there is no tomorrow. We may miss
> * some flags if we detect a binary file, the
> * alternative is to remove the return(Type)'s and
> * eat CPU for the entire binary.
> */

> linetype = classifyLineAsTypes(ptr, len);

> if (linetype & UUE) {
> Base64 = 0;
> BinHex = 0;
> UUencode++;
> if (UUencode > 8) {
> Type |= ARTTYPE_UUENCODE | ARTTYPE_BINARY;
> return(Type);
> }
> } else if (linetype & BHX) {
> UUencode = 0;
> Base64 = 0;
> BinHex++;
> if (BinHex > 8) {
> Type |= ARTTYPE_BINHEX | ARTTYPE_BINARY;
> return(Type);
> }
> } else if (linetype & B64) {
> UUencode = 0;
> BinHex = 0;
> Base64++;
> if (Base64 > 8) {
> Type |= ARTTYPE_BASE64 | ARTTYPE_BINARY;
> return(Type);
> }
> } else {
> if (*ptr == '-' &&
> strncmp(ptr, "-----BEGIN PGP MESSAGE-----", 27) == 0)
> Type |= ARTTYPE_PGPMESSAGE;
> UUencode = 0;
> Base64 = 0;
> BinHex = 0;
> }
> }

Maybe just change:

if (*ptr == '-' &&
strncmp(ptr, "-----BEGIN PGP MESSAGE-----", 27) == 0)
Type |= ARTTYPE_PGPMESSAGE;

to:

if (*ptr == '-' &&
strncmp(ptr, "-----BEGIN PGP ", 15) == 0)
Type |= ARTTYPE_PGPMESSAGE;

--
Retro Guy

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tv8f15$2pni$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1532&group=news.software.nntp#1532

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!diablo1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 02:05:25 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tv8f15$2pni$1@nnrp.usenet.blueworldhosting.com>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <9e316a26602e6764c6f722dc5c002594@news.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 20 Mar 2023 02:05:25 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="91890"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:UMYjZ8tVrqoTLcxP04g9x+Y80wY= sha256:zdNvEsUW0ZcrydEfZH0pXeqFlvsHYGZfqT/DcU9yYIQ=
sha1:cMvVHv0Wt51g2EmUEA9dy/M84XU= sha256:ccq05CyE3XZeWpUgfUVYzEzKKywVH1ewsdLn3845770=
X-Usenapp: v1.26.3/d - Full License
 by: Jesse Rehmer - Mon, 20 Mar 2023 02:05 UTC

On Mar 19, 2023 at 8:30:32 PM CDT, "Retro Guy" <Retro Guy> wrote:

> Maybe just change:
>
> if (*ptr == '-' &&
> strncmp(ptr, "-----BEGIN PGP MESSAGE-----", 27) == 0)
> Type |= ARTTYPE_PGPMESSAGE;
>
> to:
>
> if (*ptr == '-' &&
> strncmp(ptr, "-----BEGIN PGP ", 15) == 0)
> Type |= ARTTYPE_PGPMESSAGE;

Thanks for that, not being a C developer I didn't even put together that "27"
was the number of characters in the string, didn't know how to account for
that, and now feel like a n00b.

I will recompile and give this a shot, I really appreciate it!

-Jesse

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tv8jmo$1kmu$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1537&group=news.software.nntp#1537

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!diablo1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 03:25:12 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tv8jmo$1kmu$1@nnrp.usenet.blueworldhosting.com>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <9e316a26602e6764c6f722dc5c002594@news.novabbs.org> <tv8f15$2pni$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 20 Mar 2023 03:25:12 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="53982"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:9971S5t/UyvQe8MhaqxmhdwgHLM= sha256:+MuXGYGTjy1ueUGdbLH1aUJjwVjng1qC+MmUYLBQsPo=
sha1:RkJY6lSTmGc7y0IxW0e4bW6jxyc= sha256:4a8KAoUQwuhAYnVxxod+0+nmrJa2jNgilMGUT86soUY=
X-Usenapp: v1.26.3/d - Full License
 by: Jesse Rehmer - Mon, 20 Mar 2023 03:25 UTC

On Mar 19, 2023 at 9:05:25 PM CDT, "Jesse Rehmer"
<jesse.rehmer@blueworldhosting.com> wrote:

> On Mar 19, 2023 at 8:30:32 PM CDT, "Retro Guy" <Retro Guy> wrote:
>
>> Maybe just change:
>>
>> if (*ptr == '-' &&
>> strncmp(ptr, "-----BEGIN PGP MESSAGE-----", 27) == 0)
>> Type |= ARTTYPE_PGPMESSAGE;
>>
>> to:
>>
>> if (*ptr == '-' &&
>> strncmp(ptr, "-----BEGIN PGP ", 15) == 0)
>> Type |= ARTTYPE_PGPMESSAGE;
>
> Thanks for that, not being a C developer I didn't even put together that "27"
> was the number of characters in the string, didn't know how to account for
> that, and now feel like a n00b.
>
> I will recompile and give this a shot, I really appreciate it!
>
> -Jesse

Hrm, I guess another portion of the code higher up is taking precedence as
this didn't change the behavior with messages like:
<tv8i7j$q8m$1@rasp.pasdenom.info>

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tv8k5h$2i1s$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1538&group=news.software.nntp#1538

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!diablo1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 03:33:05 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tv8k5h$2i1s$1@nnrp.usenet.blueworldhosting.com>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <9e316a26602e6764c6f722dc5c002594@news.novabbs.org> <tv8f15$2pni$1@nnrp.usenet.blueworldhosting.com> <tv8jmo$1kmu$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 20 Mar 2023 03:33:05 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="84028"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:/HI+ZGtdtB/QYgisx449TH/1K2A= sha256:QmFWQUtLogzRlJRH6b5aOiWgDCGkpyUbxi3kKygASV4=
sha1:A7t+dE4c7sBONjvSOiXO73GfKug= sha256:A76E8UkGTkhlHcBBKW2QcnndiDvLfq+mGaJw1pQ90QU=
X-Usenapp: v1.26.3/d - Full License
 by: Jesse Rehmer - Mon, 20 Mar 2023 03:33 UTC

On Mar 19, 2023 at 10:25:12 PM CDT, "Jesse Rehmer"
<jesse.rehmer@blueworldhosting.com> wrote:

> On Mar 19, 2023 at 9:05:25 PM CDT, "Jesse Rehmer"
> <jesse.rehmer@blueworldhosting.com> wrote:
>
>> On Mar 19, 2023 at 8:30:32 PM CDT, "Retro Guy" <Retro Guy> wrote:
>>
>>> Maybe just change:
>>>
>>> if (*ptr == '-' &&
>>> strncmp(ptr, "-----BEGIN PGP MESSAGE-----", 27) == 0)
>>> Type |= ARTTYPE_PGPMESSAGE;
>>>
>>> to:
>>>
>>> if (*ptr == '-' &&
>>> strncmp(ptr, "-----BEGIN PGP ", 15) == 0)
>>> Type |= ARTTYPE_PGPMESSAGE;
>>
>> Thanks for that, not being a C developer I didn't even put together that "27"
>> was the number of characters in the string, didn't know how to account for
>> that, and now feel like a n00b.
>>
>> I will recompile and give this a shot, I really appreciate it!
>>
>> -Jesse
>
> Hrm, I guess another portion of the code higher up is taking precedence as
> this didn't change the behavior with messages like:
> <tv8i7j$q8m$1@rasp.pasdenom.info>

I'm thinking it is the portion of code right above the PGP stuff:

} else if (linetype & B64) {
UUencode = 0;
BinHex = 0;
Base64++;
if (Base64 > 8) {
Type |= ARTTYPE_BASE64 | ARTTYPE_BINARY;
return(Type);
}

I'm assuming this is counting any article with more than 8 lines of Base64
encoded text as binary?

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tv9cuv$3ti$1@freeq.furie.org.uk>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1539&group=news.software.nntp#1539

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.furie.org.uk!.POSTED.2001:470:1f1d:50e::11c!not-for-mail
From: tom@furie.org.uk (Tom Furie)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent
miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 10:36:15 -0000 (UTC)
Message-ID: <tv9cuv$3ti$1@freeq.furie.org.uk>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com>
<9e316a26602e6764c6f722dc5c002594@news.novabbs.org>
<tv8f15$2pni$1@nnrp.usenet.blueworldhosting.com>
<tv8jmo$1kmu$1@nnrp.usenet.blueworldhosting.com>
<tv8k5h$2i1s$1@nnrp.usenet.blueworldhosting.com>
Injection-Date: Mon, 20 Mar 2023 10:36:15 -0000 (UTC)
Injection-Info: freeq.furie.org.uk; posting-host="2001:470:1f1d:50e::11c";
logging-data="4018"; mail-complaints-to="usenet@furie.org.uk"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:IDuDdZaQipaQF1RzvMqxaOa2ctA=
 by: Tom Furie - Mon, 20 Mar 2023 10:36 UTC

On 2023-03-20, Jesse Rehmer <jesse.rehmer@blueworldhosting.com> wrote:
> On Mar 19, 2023 at 10:25:12 PM CDT, "Jesse Rehmer"
>>
>> Hrm, I guess another portion of the code higher up is taking precedence as
>> this didn't change the behavior with messages like:
>> <tv8i7j$q8m$1@rasp.pasdenom.info>
>
> I'm thinking it is the portion of code right above the PGP stuff:
>
> } else if (linetype & B64) {
> UUencode = 0;
> BinHex = 0;
> Base64++;
> if (Base64 > 8) {
> Type |= ARTTYPE_BASE64 | ARTTYPE_BINARY;
> return(Type);
> }
>
> I'm assuming this is counting any article with more than 8 lines of Base64
> encoded text as binary?

That certainly seems to be the case. I'd be tempted to switch the order
of this whole 'if-else' sequence so the check for "-----BEGIN PGP ..."
comes before the binary tests.

Cheers,
Tom

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tv9qce$dtq$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1540&group=news.software.nntp#1540

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!diablo1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 14:25:18 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tv9qce$dtq$1@nnrp.usenet.blueworldhosting.com>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <tv8jmo$1kmu$1@nnrp.usenet.blueworldhosting.com> <tv8k5h$2i1s$1@nnrp.usenet.blueworldhosting.com> <tv9cuv$3ti$1@freeq.furie.org.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 20 Mar 2023 14:25:18 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="14266"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:7V1PyYYEST2Iw0risMO8NipgW8g= sha256:pBt6XZYuCEEB72DzlAmUyCoE9Myvz0+9IogFx4AMCy0=
sha1:6zof4xEcqsTUEcLv1b3sSqmJ6Iw= sha256:Jt5m5/5LafD1qiIY/70g7zSSyXAbqH4nxpwmXA6UN00=
X-Usenapp: v1.26.3/d - Full License
 by: Jesse Rehmer - Mon, 20 Mar 2023 14:25 UTC

On Mar 20, 2023 at 5:36:15 AM CDT, "Tom Furie" <tom@furie.org.uk> wrote:

> On 2023-03-20, Jesse Rehmer <jesse.rehmer@blueworldhosting.com> wrote:
>> On Mar 19, 2023 at 10:25:12 PM CDT, "Jesse Rehmer"
>>>
>>> Hrm, I guess another portion of the code higher up is taking precedence as
>>> this didn't change the behavior with messages like:
>>> <tv8i7j$q8m$1@rasp.pasdenom.info>
>>
>> I'm thinking it is the portion of code right above the PGP stuff:
>>
>> } else if (linetype & B64) {
>> UUencode = 0;
>> BinHex = 0;
>> Base64++;
>> if (Base64 > 8) {
>> Type |= ARTTYPE_BASE64 | ARTTYPE_BINARY;
>> return(Type);
>> }
>>
>> I'm assuming this is counting any article with more than 8 lines of Base64
>> encoded text as binary?
>
> That certainly seems to be the case. I'd be tempted to switch the order
> of this whole 'if-else' sequence so the check for "-----BEGIN PGP ..."
> comes before the binary tests.
>
> Cheers,
> Tom

I may give this a try. I ended up disabling the IFILTER feed/label and it
stopped the behavior.

I'm a bit confused by it's intended behavior, as I thought it was only for
rejecting misplaced binaries, but looking at the logs I see it is identifying
these particular messages as some other type, but according to what is in
lib/defs.h, I can't quite make heads or tails of how these translate.

Take these two entries for example:

2023-03-20 01:00:03.737 somehost - <tv8sp3$fql$1@rasp.pasdenom.info> 2642
020b00 IncomingFilter
2023-03-20 01:00:03.738 somehost - <tv8sp3$fql$1@rasp.pasdenom.info> 2656
020b00 IncomingFilter

The article type logged is "020b00", which that string does not appear
anywhere in the source code. In lib/defs.h there is the following block:

/*
* Article types that diablo can determine when receiving an article
*/

#define ARTTYPE_NONE 0x000000

#define ARTTYPE_DEFAULT 0x000001
#define ARTTYPE_CONTROL 0x000002
#define ARTTYPE_CANCEL 0x000004

#define ARTTYPE_MIME 0x000100
#define ARTTYPE_BINARY 0x000200
#define ARTTYPE_UUENCODE 0x000400
#define ARTTYPE_BASE64 0x000800
#define ARTTYPE_MULTIPART 0x001000
#define ARTTYPE_HTML 0x002000
#define ARTTYPE_PS 0x004000
#define ARTTYPE_BINHEX 0x008000
#define ARTTYPE_PARTIAL 0x010000
#define ARTTYPE_PGPMESSAGE 0x020000
#define ARTTYPE_YENC 0x040000
#define ARTTYPE_BOMMANEWS 0x080000
#define ARTTYPE_UNIDATA 0x100000

#define ARTTYPE_ALL 0xFFFFFF

Other articles that are misplaced binaries show up in the logs like this:

2023-03-20 02:50:35.991 somehost -
<001d0260a48f41ff95a5dd1ff1830a4d@lfxlxgf.ytv> 1737 050200 IncomingFilter

Where the article type is logged as "050200" but again, I'm having a hard time
understanding what this is truly supposed to indicated as its detected type.

I may be completely misunderstanding how the article type detection works and
how it is used.

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tva24q$dcm$1@freeq.furie.org.uk>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1542&group=news.software.nntp#1542

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.furie.org.uk!.POSTED.2001:470:1f1d:50e::11c!not-for-mail
From: tom@furie.org.uk (Tom Furie)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent
miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 16:37:46 -0000 (UTC)
Message-ID: <tva24q$dcm$1@freeq.furie.org.uk>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com>
<tv8jmo$1kmu$1@nnrp.usenet.blueworldhosting.com>
<tv8k5h$2i1s$1@nnrp.usenet.blueworldhosting.com>
<tv9cuv$3ti$1@freeq.furie.org.uk>
<tv9qce$dtq$1@nnrp.usenet.blueworldhosting.com>
Injection-Date: Mon, 20 Mar 2023 16:37:46 -0000 (UTC)
Injection-Info: freeq.furie.org.uk; posting-host="2001:470:1f1d:50e::11c";
logging-data="13718"; mail-complaints-to="usenet@furie.org.uk"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:Zr0IDthcyX8g9iE7s+J8sAgtc8Y=
 by: Tom Furie - Mon, 20 Mar 2023 16:37 UTC

On 2023-03-20, Jesse Rehmer <jesse.rehmer@blueworldhosting.com> wrote:
> I'm a bit confused by it's intended behavior, as I thought it was only for
> rejecting misplaced binaries, but looking at the logs I see it is
> identifying these particular messages as some other type, but according to
> what is in lib/defs.h, I can't quite make heads or tails of how these
> translate.
>
> Take these two entries for example:
>
> 2023-03-20 01:00:03.737 somehost - <tv8sp3$fql$1@rasp.pasdenom.info> 2642
> 020b00 IncomingFilter
> 2023-03-20 01:00:03.738 somehost - <tv8sp3$fql$1@rasp.pasdenom.info> 2656
> 020b00 IncomingFilter
>
> The article type logged is "020b00", which that string does not appear
> anywhere in the source code. In lib/defs.h there is the following block:
>
> /*
> * Article types that diablo can determine when receiving an article
> */
>
> #define ARTTYPE_NONE 0x000000
>
> #define ARTTYPE_DEFAULT 0x000001
> #define ARTTYPE_CONTROL 0x000002
> #define ARTTYPE_CANCEL 0x000004
>
> #define ARTTYPE_MIME 0x000100
> #define ARTTYPE_BINARY 0x000200
> #define ARTTYPE_UUENCODE 0x000400
> #define ARTTYPE_BASE64 0x000800
> #define ARTTYPE_MULTIPART 0x001000
> #define ARTTYPE_HTML 0x002000
> #define ARTTYPE_PS 0x004000
> #define ARTTYPE_BINHEX 0x008000
> #define ARTTYPE_PARTIAL 0x010000
> #define ARTTYPE_PGPMESSAGE 0x020000
> #define ARTTYPE_YENC 0x040000
> #define ARTTYPE_BOMMANEWS 0x080000
> #define ARTTYPE_UNIDATA 0x100000
>
> #define ARTTYPE_ALL 0xFFFFFF

This looks like a bitfield map, so the 020b00 you see above equates to a sum
of PGPMESSAGE + BASE64 + BINARY + MIME. At least it's recognised the PGP
element. The size of the signature (greater than the 8 line limit in the
earlier check) seems to be what triggers the filter to flag the article as
binary.

> Other articles that are misplaced binaries show up in the logs like this:
>
> 2023-03-20 02:50:35.991 somehost -
> <001d0260a48f41ff95a5dd1ff1830a4d@lfxlxgf.ytv> 1737 050200 IncomingFilter
>
> Where the article type is logged as "050200" but again, I'm having a hard
> time understanding what this is truly supposed to indicated as its
> detected type.

That 050200 says the article is a partial binary in yenc encoding.

Cheers,
Tom

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tva4p3$2b2p$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1543&group=news.software.nntp#1543

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!diablo1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 17:22:43 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tva4p3$2b2p$1@nnrp.usenet.blueworldhosting.com>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <tv9cuv$3ti$1@freeq.furie.org.uk> <tv9qce$dtq$1@nnrp.usenet.blueworldhosting.com> <tva24q$dcm$1@freeq.furie.org.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 20 Mar 2023 17:22:43 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="76889"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:5Ogn+nt2hFBpfcMjGzoL/1Gvg9k= sha256:yZYtNBu9fnIU3pZkNC2FVgjLE35ujhjSOhNSE4ZeQdQ=
sha1:+wusOvFOFz4lZ9mV5Hf+Ikscd0A= sha256:a7t+yUKaPygKRe4/R0bEtz6bEw19Mr9X6AZEf3mWxFQ=
X-Usenapp: v1.26.3/d - Full License
 by: Jesse Rehmer - Mon, 20 Mar 2023 17:22 UTC

On Mar 20, 2023 at 11:37:46 AM CDT, "Tom Furie" <tom@furie.org.uk> wrote:

> On 2023-03-20, Jesse Rehmer <jesse.rehmer@blueworldhosting.com> wrote:
>> I'm a bit confused by it's intended behavior, as I thought it was only for
>> rejecting misplaced binaries, but looking at the logs I see it is
>> identifying these particular messages as some other type, but according to
>> what is in lib/defs.h, I can't quite make heads or tails of how these
>> translate.
>>
>> Take these two entries for example:
>>
>> 2023-03-20 01:00:03.737 somehost - <tv8sp3$fql$1@rasp.pasdenom.info> 2642
>> 020b00 IncomingFilter
>> 2023-03-20 01:00:03.738 somehost - <tv8sp3$fql$1@rasp.pasdenom.info> 2656
>> 020b00 IncomingFilter
>>
>> The article type logged is "020b00", which that string does not appear
>> anywhere in the source code. In lib/defs.h there is the following block:
>>
>> /*
>> * Article types that diablo can determine when receiving an article
>> */
>>
>> #define ARTTYPE_NONE 0x000000
>>
>> #define ARTTYPE_DEFAULT 0x000001
>> #define ARTTYPE_CONTROL 0x000002
>> #define ARTTYPE_CANCEL 0x000004
>>
>> #define ARTTYPE_MIME 0x000100
>> #define ARTTYPE_BINARY 0x000200
>> #define ARTTYPE_UUENCODE 0x000400
>> #define ARTTYPE_BASE64 0x000800
>> #define ARTTYPE_MULTIPART 0x001000
>> #define ARTTYPE_HTML 0x002000
>> #define ARTTYPE_PS 0x004000
>> #define ARTTYPE_BINHEX 0x008000
>> #define ARTTYPE_PARTIAL 0x010000
>> #define ARTTYPE_PGPMESSAGE 0x020000
>> #define ARTTYPE_YENC 0x040000
>> #define ARTTYPE_BOMMANEWS 0x080000
>> #define ARTTYPE_UNIDATA 0x100000
>>
>> #define ARTTYPE_ALL 0xFFFFFF
>
> This looks like a bitfield map, so the 020b00 you see above equates to a sum
> of PGPMESSAGE + BASE64 + BINARY + MIME. At least it's recognised the PGP
> element. The size of the signature (greater than the 8 line limit in the
> earlier check) seems to be what triggers the filter to flag the article as
> binary.

Ahhh thank you, this makes sense.

I did move the PGP related if statements above the others as you had suggested
earlier. So far, so good, but may take a while to know for sure. The changes
didn't break the binary detection, so there's that.

I'm curious if there's any known reason why the developers chose 8 lines for
the checks? I assume this is somewhat arbitrary, but not certain, and thinking
if I'm still having trouble raising that value may be a better solution than
trying to make the code do things I don't fully understand.

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tvapdi$2ade$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1556&group=news.software.nntp#1556

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 23:14:58 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tvapdi$2ade$1@nnrp.usenet.blueworldhosting.com>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <tv9cuv$3ti$1@freeq.furie.org.uk> <tv9qce$dtq$1@nnrp.usenet.blueworldhosting.com> <tva24q$dcm$1@freeq.furie.org.uk> <tva4p3$2b2p$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 20 Mar 2023 23:14:58 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="76206"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:CJ+FL18RNI+7FMCFAZSIrQlA+Pw= sha256:1PivZi83uXzjN1bVnlVNqA1axJDpTciSUzBAWGbj6uw=
sha1:Zq9/n4C6mLnsfwJrKboss/QmJfE= sha256:fP9y0F5/LKqmQreom5HvFWtSqlGb+hIsjtDFCSFKEA8=
X-Usenapp: v1.26.3/d - Full License
 by: Jesse Rehmer - Mon, 20 Mar 2023 23:14 UTC

On Mar 20, 2023 at 12:22:43 PM CDT, "Jesse Rehmer"
<jesse.rehmer@blueworldhosting.com> wrote:

> On Mar 20, 2023 at 11:37:46 AM CDT, "Tom Furie" <tom@furie.org.uk> wrote:
>
>> On 2023-03-20, Jesse Rehmer <jesse.rehmer@blueworldhosting.com> wrote:
>>> I'm a bit confused by it's intended behavior, as I thought it was only for
>>> rejecting misplaced binaries, but looking at the logs I see it is
>>> identifying these particular messages as some other type, but according to
>>> what is in lib/defs.h, I can't quite make heads or tails of how these
>>> translate.
>>>
>>> Take these two entries for example:
>>>
>>> 2023-03-20 01:00:03.737 somehost - <tv8sp3$fql$1@rasp.pasdenom.info> 2642
>>> 020b00 IncomingFilter
>>> 2023-03-20 01:00:03.738 somehost - <tv8sp3$fql$1@rasp.pasdenom.info> 2656
>>> 020b00 IncomingFilter
>>>
>>> The article type logged is "020b00", which that string does not appear
>>> anywhere in the source code. In lib/defs.h there is the following block:
>>>
>>> /*
>>> * Article types that diablo can determine when receiving an article
>>> */
>>>
>>> #define ARTTYPE_NONE 0x000000
>>>
>>> #define ARTTYPE_DEFAULT 0x000001
>>> #define ARTTYPE_CONTROL 0x000002
>>> #define ARTTYPE_CANCEL 0x000004
>>>
>>> #define ARTTYPE_MIME 0x000100
>>> #define ARTTYPE_BINARY 0x000200
>>> #define ARTTYPE_UUENCODE 0x000400
>>> #define ARTTYPE_BASE64 0x000800
>>> #define ARTTYPE_MULTIPART 0x001000
>>> #define ARTTYPE_HTML 0x002000
>>> #define ARTTYPE_PS 0x004000
>>> #define ARTTYPE_BINHEX 0x008000
>>> #define ARTTYPE_PARTIAL 0x010000
>>> #define ARTTYPE_PGPMESSAGE 0x020000
>>> #define ARTTYPE_YENC 0x040000
>>> #define ARTTYPE_BOMMANEWS 0x080000
>>> #define ARTTYPE_UNIDATA 0x100000
>>>
>>> #define ARTTYPE_ALL 0xFFFFFF
>>
>> This looks like a bitfield map, so the 020b00 you see above equates to a sum
>> of PGPMESSAGE + BASE64 + BINARY + MIME. At least it's recognised the PGP
>> element. The size of the signature (greater than the 8 line limit in the
>> earlier check) seems to be what triggers the filter to flag the article as
>> binary.
>
> Ahhh thank you, this makes sense.
>
> I did move the PGP related if statements above the others as you had suggested
> earlier. So far, so good, but may take a while to know for sure. The changes
> didn't break the binary detection, so there's that.
>
> I'm curious if there's any known reason why the developers chose 8 lines for
> the checks? I assume this is somewhat arbitrary, but not certain, and thinking
> if I'm still having trouble raising that value may be a better solution than
> trying to make the code do things I don't fully understand.

I backed out several of the changes I had made that weren't successful. I
believe moving the if statement for the PGP stuff at the top of this block and
adding "return(Type);" is working as expected. I was able to re-send some
articles that were previously rejected and they made it through.

How syntactically correct it is, I don't know, but I'm still seeing it filter
misplaced binaries and other useless Base64 encoded articles like I want, but
so far no PGP messages have been filtered.

/*
* We look for binary formats first, since these eat
* up CPU like there is no tomorrow. We may miss
* some flags if we detect a binary file, the
* alternative is to remove the return(Type)'s and
* eat CPU for the entire binary.
*/

linetype = classifyLineAsTypes(ptr, len);

if (*ptr == '-' &&
strncmp(ptr, "-----BEGIN PGP ", 15) == 0)
Type |= ARTTYPE_PGPMESSAGE;
return(Type);
UUencode = 0;
Base64 = 0;
BinHex = 0;
if (linetype & UUE) {
Base64 = 0;
BinHex = 0;
UUencode++;
if (UUencode > 8) {
Type |= ARTTYPE_UUENCODE | ARTTYPE_BINARY;
return(Type);
}
} else if (linetype & BHX) {
UUencode = 0;
Base64 = 0;
BinHex++;
if (BinHex > 8) {
Type |= ARTTYPE_BINHEX | ARTTYPE_BINARY;
return(Type);
}

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<87cz5252x5.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1562&group=news.software.nntp#1562

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 18:05:58 -0700
Organization: The Eyrie
Message-ID: <87cz5252x5.fsf@hope.eyrie.org>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com>
<tv9cuv$3ti$1@freeq.furie.org.uk>
<tv9qce$dtq$1@nnrp.usenet.blueworldhosting.com>
<tva24q$dcm$1@freeq.furie.org.uk>
<tva4p3$2b2p$1@nnrp.usenet.blueworldhosting.com>
<tvapdi$2ade$1@nnrp.usenet.blueworldhosting.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="22737"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:0mrQHotuzljou4klz2incq5zKd0=
 by: Russ Allbery - Tue, 21 Mar 2023 01:05 UTC

Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:

> linetype = classifyLineAsTypes(ptr, len);

> if (*ptr == '-' &&
> strncmp(ptr, "-----BEGIN PGP ", 15) == 0)
> Type |= ARTTYPE_PGPMESSAGE;
> return(Type);

Just FYI, by doing it this way you are allowing people to send you
arbitrarily large binaries (up to your article size limit) by just adding
a line starting with "-----BEGIN PGP " before the encoded binary. This is
likely why the code didn't short-circuit analysis of the rest of the
article in that case and still flagged messages as binary if there were
more than 8 lines of encoded text. (No PGP *signature* should be that
long.)

Back in the day, if any change like this were used on a bunch of servers,
the people trading binaries that for legal reasons you really do not want
on your server would probably quickly start doing that. You're only
making this change on one server, and hopefully there isn't as much abuse
of binaries on Usenet these days, but you may still want to keep that in
mind.

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tvb244$m8j$1@nntp.de>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1565&group=news.software.nntp#1565

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!nntp.de!.POSTED.akk21-int.akk.kit.edu!not-for-mail
From: urs@akk.org (Urs Janßen)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Tue, 21 Mar 2023 01:43:32 -0000 (UTC)
Organization: nntp.de
Archive: no
Message-ID: <tvb244$m8j$1@nntp.de>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <tv9cuv$3ti$1@freeq.furie.org.uk> <tv9qce$dtq$1@nnrp.usenet.blueworldhosting.com> <tva24q$dcm$1@freeq.furie.org.uk> <tva4p3$2b2p$1@nnrp.usenet.blueworldhosting.com> <tvapdi$2ade$1@nnrp.usenet.blueworldhosting.com>
Injection-Date: Tue, 21 Mar 2023 01:43:32 -0000 (UTC)
Injection-Info: nntp.de; posting-host="akk21-int.akk.kit.edu:2a00:1398:5:f602:cafe:cafe:cafe:21";
logging-data="22803"; mail-complaints-to="abuse@nntp.de"
User-Agent: tin/2.6.3-20230217 ("Pittyvaich") (Linux/4.19.0-14-amd64 (x86_64))
Cancel-Lock: sha1:KUAPf9N+PFWS8mXnpLP6VJ0Mxf0=
X-No-Archive: yes
X-No-HTML: yes
 by: Urs Janßen - Tue, 21 Mar 2023 01:43 UTC

Jesse Rehmer wrote:

looks like missing braces

> if (*ptr == '-' &&
> strncmp(ptr, "-----BEGIN PGP ", 15) == 0)
{
> Type |= ARTTYPE_PGPMESSAGE;
> return(Type);
}

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tvb2cf$1ckd$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1566&group=news.software.nntp#1566

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Tue, 21 Mar 2023 01:47:59 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tvb2cf$1ckd$1@nnrp.usenet.blueworldhosting.com>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <tva4p3$2b2p$1@nnrp.usenet.blueworldhosting.com> <tvapdi$2ade$1@nnrp.usenet.blueworldhosting.com> <87cz5252x5.fsf@hope.eyrie.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 21 Mar 2023 01:47:59 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="45709"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:Mxhy98ZXJ1oYpDE+ndWjvWrb7Bs= sha256:A0bvBm5BUqoXNrZwuEfZ1GdbG/WVgogiitqI2dwJ5/o=
sha1:aq4JNIT/tX/j89sNiAcNL/Kivu4= sha256:kV9xaN8fnAqsFg2wB/ztoVrUu0tOFhpNU4rHkSJMnp4=
X-Usenapp: v1.26.3/d - Full License
 by: Jesse Rehmer - Tue, 21 Mar 2023 01:47 UTC

On Mar 20, 2023 at 8:05:58 PM CDT, "Russ Allbery" <eagle@eyrie.org> wrote:

> Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
>
>> linetype = classifyLineAsTypes(ptr, len);
>
>> if (*ptr == '-' &&
>> strncmp(ptr, "-----BEGIN PGP ", 15) == 0)
>> Type |= ARTTYPE_PGPMESSAGE;
>> return(Type);
>
> Just FYI, by doing it this way you are allowing people to send you
> arbitrarily large binaries (up to your article size limit) by just adding
> a line starting with "-----BEGIN PGP " before the encoded binary. This is
> likely why the code didn't short-circuit analysis of the rest of the
> article in that case and still flagged messages as binary if there were
> more than 8 lines of encoded text. (No PGP *signature* should be that
> long.)

Most PGP Signatures I'm seeing in NoCeM notices are 11 lines long. See
<tvatqb$d4n$1@rasp.pasdenom.info> as just one example. These were being
rejected before.

My personal PGP Signature is > 8 lines as well.

> Back in the day, if any change like this were used on a bunch of servers,
> the people trading binaries that for legal reasons you really do not want
> on your server would probably quickly start doing that. You're only
> making this change on one server, and hopefully there isn't as much abuse
> of binaries on Usenet these days, but you may still want to keep that in
> mind.

I understand your points, and need to think this through a little more.

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<87a606yf4a.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1572&group=news.software.nntp#1572

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 20:09:41 -0700
Organization: The Eyrie
Message-ID: <87a606yf4a.fsf@hope.eyrie.org>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com>
<tva4p3$2b2p$1@nnrp.usenet.blueworldhosting.com>
<tvapdi$2ade$1@nnrp.usenet.blueworldhosting.com>
<87cz5252x5.fsf@hope.eyrie.org>
<tvb2cf$1ckd$1@nnrp.usenet.blueworldhosting.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="28135"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:lnSR9HDJ1Wyj5rWUAKw+7rx2d6U=
 by: Russ Allbery - Tue, 21 Mar 2023 03:09 UTC

Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
> On Mar 20, 2023 at 8:05:58 PM CDT, "Russ Allbery" <eagle@eyrie.org> wrote:

>> Just FYI, by doing it this way you are allowing people to send you
>> arbitrarily large binaries (up to your article size limit) by just
>> adding a line starting with "-----BEGIN PGP " before the encoded
>> binary. This is likely why the code didn't short-circuit analysis of
>> the rest of the article in that case and still flagged messages as
>> binary if there were more than 8 lines of encoded text. (No PGP
>> *signature* should be that long.)

> Most PGP Signatures I'm seeing in NoCeM notices are 11 lines long. See
> <tvatqb$d4n$1@rasp.pasdenom.info> as just one example. These were being
> rejected before.

> My personal PGP Signature is > 8 lines as well.

Ah, yes, indeed, I'm wrong about how long the RSA signatures are (I assume
that's what that is; I didn't check) with a sufficiently large key. It
looks like, back in the day, I used a 40 line cutoff in my binary filter.

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tvb7hh$1b5o$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1576&group=news.software.nntp#1576

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!peer01.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Tue, 21 Mar 2023 03:16:01 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tvb7hh$1b5o$1@nnrp.usenet.blueworldhosting.com>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <87cz5252x5.fsf@hope.eyrie.org> <tvb2cf$1ckd$1@nnrp.usenet.blueworldhosting.com> <87a606yf4a.fsf@hope.eyrie.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 21 Mar 2023 03:16:01 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="44216"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:yIgQJYHFvTgZ53lLzfxShlmApLg= sha256:cN63sJs/GJhHAd4J8MbUjZH9dr6otzR7kChATm2DSUc=
sha1:yVSDCdSrrnQj7yZWIbbPAdCnwI0= sha256:t1HDsReIIbnTHFys+vmX1RfPwurab/dq1trCoS8LHTo=
X-Usenapp: v1.26.3/d - Full License
X-Received-Bytes: 2882
 by: Jesse Rehmer - Tue, 21 Mar 2023 03:16 UTC

On Mar 20, 2023 at 10:09:41 PM CDT, "Russ Allbery" <eagle@eyrie.org> wrote:

> Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
>> On Mar 20, 2023 at 8:05:58 PM CDT, "Russ Allbery" <eagle@eyrie.org> wrote:
>
>>> Just FYI, by doing it this way you are allowing people to send you
>>> arbitrarily large binaries (up to your article size limit) by just
>>> adding a line starting with "-----BEGIN PGP " before the encoded
>>> binary. This is likely why the code didn't short-circuit analysis of
>>> the rest of the article in that case and still flagged messages as
>>> binary if there were more than 8 lines of encoded text. (No PGP
>>> *signature* should be that long.)
>
>> Most PGP Signatures I'm seeing in NoCeM notices are 11 lines long. See
>> <tvatqb$d4n$1@rasp.pasdenom.info> as just one example. These were being
>> rejected before.
>
>> My personal PGP Signature is > 8 lines as well.
>
> Ah, yes, indeed, I'm wrong about how long the RSA signatures are (I assume
> that's what that is; I didn't check) with a sufficiently large key. It
> looks like, back in the day, I used a 40 line cutoff in my binary filter.

I did take your advice, reverted to the original code, and increased the
base64 line count. Should have realized it was that simple in the first place,
but I wasn't sure if that 8 line reference was a standard or arbitrary from
back in the day.

Really appreciate everyone's help here on this, it frustrated the shit out of
me, and felt like it should be simple, and naturally it was.

Thanks all!

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<87lejqwz60.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1581&group=news.software.nntp#1581

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 20:39:35 -0700
Organization: The Eyrie
Message-ID: <87lejqwz60.fsf@hope.eyrie.org>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com>
<87cz5252x5.fsf@hope.eyrie.org>
<tvb2cf$1ckd$1@nnrp.usenet.blueworldhosting.com>
<87a606yf4a.fsf@hope.eyrie.org>
<tvb7hh$1b5o$1@nnrp.usenet.blueworldhosting.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="28135"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:zipb0/zZjfialqrPbRsAkw6VCBA=
 by: Russ Allbery - Tue, 21 Mar 2023 03:39 UTC

Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:

> I did take your advice, reverted to the original code, and increased the
> base64 line count. Should have realized it was that simple in the first
> place, but I wasn't sure if that 8 line reference was a standard or
> arbitrary from back in the day.

I'm fairly sure it's just arbitrary. Definitely not a formal standard.

My theory was that you can't pack a binary that would cause any real
trouble into only 40 lines of base64. I'm not 100% sure that's true
depending on whether implementations allow very long lines, but meh, this
stuff is all kind of fiddly anyway.

I suspect that Diablo code may be too old to detect yEnc, so you may still
be getting binaries. (I assume yEnc is still a thing people use; I am
very out of touch with anything that's happening over in binary land.)

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tvb9en$2g78$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1582&group=news.software.nntp#1582

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Tue, 21 Mar 2023 03:48:39 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tvb9en$2g78$1@nnrp.usenet.blueworldhosting.com>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <87a606yf4a.fsf@hope.eyrie.org> <tvb7hh$1b5o$1@nnrp.usenet.blueworldhosting.com> <87lejqwz60.fsf@hope.eyrie.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 21 Mar 2023 03:48:39 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="82152"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:0G5V1XlYbuc8Vvl27cZgSF1w29w= sha256:n7jqyfFG0a3CQg8djEwrh2wKihoSuoMDnfH0+6Iz8os=
sha1:w9+1wwA3x7ziM0GoVx4HPvIj8Pw= sha256:zXH3gZbM/+WV2fwxZT9QeDiNisyot7Y2qn0Lj+S1v7U=
X-Usenapp: v1.26.3/d - Full License
 by: Jesse Rehmer - Tue, 21 Mar 2023 03:48 UTC

On Mar 20, 2023 at 10:39:35 PM CDT, "Russ Allbery" <eagle@eyrie.org> wrote:

> Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
>
>> I did take your advice, reverted to the original code, and increased the
>> base64 line count. Should have realized it was that simple in the first
>> place, but I wasn't sure if that 8 line reference was a standard or
>> arbitrary from back in the day.
>
> I'm fairly sure it's just arbitrary. Definitely not a formal standard.
>
> My theory was that you can't pack a binary that would cause any real
> trouble into only 40 lines of base64. I'm not 100% sure that's true
> depending on whether implementations allow very long lines, but meh, this
> stuff is all kind of fiddly anyway.
>
> I suspect that Diablo code may be too old to detect yEnc, so you may still
> be getting binaries. (I assume yEnc is still a thing people use; I am
> very out of touch with anything that's happening over in binary land.)

It's very good at detecting yEnc (still the most popular format).

Not sure how much I care about alt.anonymous.messages and similar groups, but
I see quite a few PGP messages that I accepted while running pyClean and
Cleanfeed in my spool that are >1,000 lines. Not sure how safe it would be to
modify the Diablo base64 filter to allow that many lines. I guess if I cared
about getting those messages (currently I do not) I could add a delgroupany
statements for those specific groups to the IFILTER feed label.

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<87h6uewxkn.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1583&group=news.software.nntp#1583

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Mon, 20 Mar 2023 21:14:00 -0700
Organization: The Eyrie
Message-ID: <87h6uewxkn.fsf@hope.eyrie.org>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com>
<87a606yf4a.fsf@hope.eyrie.org>
<tvb7hh$1b5o$1@nnrp.usenet.blueworldhosting.com>
<87lejqwz60.fsf@hope.eyrie.org>
<tvb9en$2g78$1@nnrp.usenet.blueworldhosting.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="28135"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:rZ7bFYWA1OnxKWq5PrzmoGWi/7M=
 by: Russ Allbery - Tue, 21 Mar 2023 04:14 UTC

Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
> On Mar 20, 2023 at 10:39:35 PM CDT, "Russ Allbery" <eagle@eyrie.org> wrote:

>> I suspect that Diablo code may be too old to detect yEnc, so you may
>> still be getting binaries. (I assume yEnc is still a thing people use;
>> I am very out of touch with anything that's happening over in binary
>> land.)

> It's very good at detecting yEnc (still the most popular format).

Oh, good!

> Not sure how much I care about alt.anonymous.messages and similar
> groups, but I see quite a few PGP messages that I accepted while running
> pyClean and Cleanfeed in my spool that are >1,000 lines.

My personal opinion is that those groups are silly and I don't feel the
need to use my resources to support them, but that's just me. I think it
takes some real mental contortions to convince yourself that the best
solution to communicating privately with someone else without being
vulnerable to traffic analysis is to convince a bunch of people all over
the world to pass all the messages around to everyone, almost none of whom
can read anything there. It has very strong https://xkcd.com/538/ energy.

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP

<tvbbbq$en9$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1584&group=news.software.nntp#1584

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!feeder1.feed.usenet.farm!feed.usenet.farm!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
Date: Tue, 21 Mar 2023 04:21:14 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <tvbbbq$en9$1@nnrp.usenet.blueworldhosting.com>
References: <tv8ale$2t9m$1@nnrp.usenet.blueworldhosting.com> <87lejqwz60.fsf@hope.eyrie.org> <tvb9en$2g78$1@nnrp.usenet.blueworldhosting.com> <87h6uewxkn.fsf@hope.eyrie.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 21 Mar 2023 04:21:14 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="15081"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:U1dayFhpFHIHqYfVpxRT2iu37sw= sha256:JTStlmJxZX+HmbUtNsrYu36lOfx84izM+hNs0NWZii8=
sha1:6uf1mJ1kAno2aWOnbcpNBTxg3OY= sha256:jP+nyYkmw9hXdngHK1K3sQurmyNJIfteoVvlAFg+UvE=
X-Usenapp: v1.26.3/d - Full License
 by: Jesse Rehmer - Tue, 21 Mar 2023 04:21 UTC

On Mar 20, 2023 at 11:14:00 PM CDT, "Russ Allbery" <eagle@eyrie.org> wrote:

> Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
>> On Mar 20, 2023 at 10:39:35 PM CDT, "Russ Allbery" <eagle@eyrie.org> wrote:
>
>>> I suspect that Diablo code may be too old to detect yEnc, so you may
>>> still be getting binaries. (I assume yEnc is still a thing people use;
>>> I am very out of touch with anything that's happening over in binary
>>> land.)
>
>> It's very good at detecting yEnc (still the most popular format).
>
> Oh, good!
>
>> Not sure how much I care about alt.anonymous.messages and similar
>> groups, but I see quite a few PGP messages that I accepted while running
>> pyClean and Cleanfeed in my spool that are >1,000 lines.
>
> My personal opinion is that those groups are silly and I don't feel the
> need to use my resources to support them, but that's just me. I think it
> takes some real mental contortions to convince yourself that the best
> solution to communicating privately with someone else without being
> vulnerable to traffic analysis is to convince a bunch of people all over
> the world to pass all the messages around to everyone, almost none of whom
> can read anything there. It has very strong https://xkcd.com/538/ energy.

I got a good chuckle and share the sentiment. That said, I offer my spool up
for reading to anyone without authentication, so who knows, but it seems
unlikely anyone actually reading or exchanging those messages would complain
to me if they weren't there.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor