Deutsch English Français Italiano |
<t658tq$8tj$1@rasp.pasdenom.info> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!pasdenom.info!.POSTED.2a01:e0a:21:ea80:16a1:7d26:987e:eea2!not-for-mail From: yamo' <yamo@beurdin.invalid> Newsgroups: fr.comp.usenet.serveurs Subject: Re: Champ cancel-lock multiligne Date: Thu, 19 May 2022 13:16:09 +0200 Organization: <http://pasdenom.info/news.html> Message-ID: <t658tq$8tj$1@rasp.pasdenom.info> References: <t5orgk$oqk$1@dont-email.me> <t62gbk$hka$1@rasp.pasdenom.info> <t62hif$jce$1@shakotay.alphanet.ch> <t62hua$lf6$1@shakotay.alphanet.ch> <t62jeo$r8a$1@rasp.pasdenom.info> <t62o37$ead$1@shakotay.alphanet.ch> <t64l64$p4t$1@rasp.pasdenom.info> <t64seh$trg$1@shakotay.alphanet.ch> <t652iq$p67$1@rasp.pasdenom.info> <t65508$ur6$1@rasp.pasdenom.info> <t6562v$95b$1@shakotay.alphanet.ch> <t6581c$4ad$3@rasp.pasdenom.info> <t65869$nvm$1@dont-email.me> <t6589q$4ad$5@rasp.pasdenom.info> <t658m4$lci$1@shakotay.alphanet.ch> Reply-To: yamo@groumpf.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 19 May 2022 11:16:10 -0000 (UTC) Injection-Info: rasp.pasdenom.info; posting-account="stephane"; posting-host="2a01:e0a:21:ea80:16a1:7d26:987e:eea2"; logging-data="9139"; mail-complaints-to="abuse@pasdenom.info" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.12 Cancel-Lock: sha256:uHDukqn6IL35eOZTeRjgwnxgt1hLNcrjGqGlxZOZjzg= In-Reply-To: <t658m4$lci$1@shakotay.alphanet.ch> X-Seamonkey: <https://www.seamonkey-project.org/> Bytes: 3766 Lines: 74 Marc SCHAEFER a tapoté le 19/05/2022 13:12: > yamo' <yamo@beurdin.invalid> wrote: >> Tu peux. > > Le diff ressemble à quoi? > > J'avais fait une erreur de nom de variable dans une des premières > versions du patch, et comme le script n'est pas en use strict; use > warnings; c'était invisible. > > Depuis, avec la version: > > https://nnrp.alphanet.ch/newsgroup/fr.comp.usenet.serveurs/%3Ct5u0k3$5op$1@shakotay.alphanet.ch%3E > > Le bug était d'utiliser une variable inexistante $art plutôt que > $headers dans le for ou le foreach. > > Pas de souci me semble-t-il désormais. > J'ai : sub verify_cancel($$$) { my $r_hdr = shift || die; my $target = shift; my $descr = shift; my $headers = INN::head($target); if (!$headers){ # saveart('log.cancel',"$descr of non-existing ID $target"); # return undef; return "$descr of non-existing ID"; } my %headers; # for my $line(split(/\s*\n/, $headers)) { my $previous; foreach my $line (split(/\s*\n/, $headers)) { if ($line =~ m/^([[:alnum:]-]+):\s+(.*)/) { $previous = $1; } elsif ($line =~ m/^\s+(.*)/) { if (defined($previous)) { $headers{$previous} .= " " . $1; } else { INN::syslog('notice', 'garbled line: ' . $line); } } } my $lock = $headers{'Cancel-Lock'}; if (defined($lock)) { my $key = $r_hdr->{'Cancel-Key'} || return "$descr of $target without Cancel-Key"; return verify_cancel_key($key, $lock, $target); } else { # saveart('log.cancel',"$descr of $target without Cancel-Key and Cancel-Lock"); # -thh # no cancel-lock: go ahead and cancel anyway! # You refuse the cancel here... # local stuff... INN::syslog("info", "No Cancel-Key for $descr $target"); saveart('bad.cancel','No Cancel-Key'); return reject('No Cancel-Key'); #return "$descr of $target without Cancel-key"; # INN::cancel($target); } return undef; } -- Stéphane