🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #89240

Re: readers.conf

#89240
From: Julien ÉLIE
Date: Sat, 19 Mar 2022 08:25
45 lines
3069 bytes
Hi all,

> hosts: "192.168.1.0/24, !192.168.1.5"
>
> After further investigation, I better understand the issue you're facing.
> This syntax does not work.  I would tend to think this is a bug, but am 
> unsure.  We have no examples of a "!" syntax in "hosts" lists in 
> readers.conf...
> 
> The code just parses each part of the list, starting from the end.  So, 
> assuming you're connecting from 192.168.1.5, it does:
> 
> 1/ Does "!192.168.1.5" matches 192.168.1.5?  No, so go on trying.
> 2/ Does "192.168.1.0/24" matches 192.168.1.5?  Yes, so the auth block 
> succeeds.
> 
> I would have said at step 1 that the auth block fails, but that's not 
> what the code does...  Any opinion about that, and if it should be changed?
> 
> At least the documentation needs fixing as it says for "hosts": 
> "comma-separated wildmat expressions allowed, but @ is not supported".

After all, I believe it should be fixed for INN 2.7.0.  And an example 
added.
I've digged a bit in the history.  We lost a check during a refactoring. 
  The MatchHost() function in nnrpd once had near its end:

   if (ret && list[iter][0] == '!')
     ret = false;

The "!" syntax has not been working since INN 2.5.0 for the hosts pattern.

Many thanks to you, Miner, for your question about that use case!

For the time being, you can use the syntax with 2 blocks I suggested in 
my previous message.
The expected syntax with only 1 block should work again in the next 
release (INN 2.7.0 normally, as no other INN 2.6.x release is scheduled 
unless a blocking issue is found on INN 2.6.5).

-- 
Julien ÉLIE

« Les amis de la vérité sont ceux qui la cherchent, et non ceux qui se
   vantent de l'avoir trouvée. » (Condorcet)
Technical Details
Message-ID: <t14424$gnru$1@news.trigofacile.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-mail
References: <t0krjp$6fh$1@txtcon.i2p> <t12i1g$fkek$1@news.trigofacile.com> <t142go$gncm$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <t14424$gnru$1@news.trigofacile.com>
Subject: Re: readers.conf
Date: Sat, 19 Mar 2022 09:25:40 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <t0krjp$6fh$1@txtcon.i2p> <t12i1g$fkek$1@news.trigofacile.com> <t142go$gncm$1@news.trigofacile.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-mail
Newsgroups: news.software.nntp
Organization: Groupes francophones par TrigoFACILE
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 19 Mar 2022 08:25:40 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105"; logging-data="548734"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0
Cancel-Lock: sha1:WM9OjSbfht1/KPHUY3t2n1I5LSw= sha256:5U57RvtNn2QM6Nj7dxnb2d/+9r5+Jtmul5/kiJrhYZk= sha1:wAgwaE1bsEkO1Vb9hdz8ytgOQOg= sha256:IKQVaX3MJ+i0NZ9/XP1sEQC9118TFMXTmzBqZudcqfI=
In-Reply-To: <t142go$gncm$1@news.trigofacile.com>