Article View: news.software.nntp
Article #90175Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP
From: Jesse Rehmer
Date: Mon, 20 Mar 2023 17:22
Date: Mon, 20 Mar 2023 17:22
61 lines
4126 bytes
4126 bytes
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.
Technical Details
Message-ID:
<tva4p3$2b2p$1@nnrp.usenet.blueworldhosting.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<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>Show Full Headers
Complete Article Headers
Message-ID: <tva4p3$2b2p$1@nnrp.usenet.blueworldhosting.com> Subject: Re: Seeking help modifying Diablo source to prevent miscategorization of articles containing PGP Date: Mon, 20 Mar 2023 17:22:43 +0000 From: Jesse Rehmer <jesse.rehmer@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> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.nntp Organization: BlueWorld Hosting Usenet (https://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 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