Message ID | 20180214193522.26880-4-berny156@gmx.de |
---|---|
State | Dropped |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.ipfire.org [IPv6:2001:470:7183:25::1]) by web02.i.ipfire.org (Postfix) with ESMTP id 9DDB460C10 for <patchwork@web02.i.ipfire.org>; Wed, 14 Feb 2018 20:36:09 +0100 (CET) X-Virus-Scanned: ClamAV at mail01.ipfire.org Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 438FB105FC87; Wed, 14 Feb 2018 19:36:14 +0000 (GMT) Authentication-Results: mail01.ipfire.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: mail01.ipfire.org; spf=pass smtp.mailfrom=development-bounces@lists.ipfire.org X-Virus-Scanned: ClamAV at mail01.ipfire.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 3772A1063DFA for <development@lists.ipfire.org>; Wed, 14 Feb 2018 19:35:54 +0000 (GMT) Authentication-Results: mail01.ipfire.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: mail01.ipfire.org; spf=pass smtp.mailfrom=berny156@gmx.de Received: from quad.berny.local ([46.244.233.56]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MSuMn-1fBiTJ0tld-00Rnpt for <development@lists.ipfire.org>; Wed, 14 Feb 2018 20:35:32 +0100 From: Bernhard Held <berny156@gmx.de> To: development@lists.ipfire.org Subject: [PATCH v3 3/4] proxy.cgi: strip newline from subnet parameters Date: Wed, 14 Feb 2018 20:35:21 +0100 Message-Id: <20180214193522.26880-4-berny156@gmx.de> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180214193522.26880-1-berny156@gmx.de> References: <20180214193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uGny/r07R/d+HiygG4+6R6xp2qPZ+HuokoEGFqGrGnhD X5PhKuJBwCXlPXH8mSs6wIlctpXHw== X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <https://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
proxy.cgi fixes for bugzilla #10852
|
|
Commit Message
Bernhard Held
Feb. 15, 2018, 6:35 a.m. UTC
The subnets in @templist end with newlines. Theses have to be removed before printing and comparison with other subnets. --- html/cgi-bin/proxy.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
Hi, newlines have to be stripped from each line. Therefore the code should read: close(SUBNETS); } foreach (@templist) { chomp; @temp = split(/\//); - Bernhard > Gesendet: Mittwoch, 14. Februar 2018 um 20:35 Uhr > Von: "Bernhard Held" <berny156@gmx.de> > An: development@lists.ipfire.org > Betreff: [PATCH v3 3/4] proxy.cgi: strip newline from subnet parameters > > The subnets in @templist end with newlines. Theses have to be removed > before printing and comparison with other subnets. > --- > html/cgi-bin/proxy.cgi | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi > index 6aa14e15a..d565ffbdc 100644 > --- a/html/cgi-bin/proxy.cgi > +++ b/html/cgi-bin/proxy.cgi > @@ -3061,6 +3061,8 @@ END > close(SUBNETS); > } > > + chomp(@templist); > + > foreach (@templist) > { > @temp = split(/\//); > @@ -3069,7 +3071,6 @@ END > ($temp[0] ne $netsettings{'BLUE_NETADDRESS'}) && ($temp[1] ne $netsettings{'BLUE_NETMASK'}) > ) > { > - chomp $temp[1]; > print FILE " ||\n (isInNet(myIpAddress(), \"$temp[0]\", \"$temp[1]\"))"; > } > } > -- > 2.16.1 > >
> Bernhard Bitsch <Bernhard.Bitsch@gmx.de> hat am 15. Februar 2018 um 00:14 geschrieben: > newlines have to be stripped from each line. > Therefore the code should read: > close(SUBNETS); > } > > foreach (@templist) > { > chomp; > @temp = split(/\//); Hm, I see now that I misinterpreted your last comment regarding this patch. However, v3 is still correct, because if you chomp a list, each element is chomped. Regards, Bernhard > - Bernhard > > > Gesendet: Mittwoch, 14. Februar 2018 um 20:35 Uhr > > Von: "Bernhard Held" <berny156@gmx.de> > > An: development@lists.ipfire.org > > Betreff: [PATCH v3 3/4] proxy.cgi: strip newline from subnet parameters > > > > The subnets in @templist end with newlines. Theses have to be removed > > before printing and comparison with other subnets. > > --- > > html/cgi-bin/proxy.cgi | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi > > index 6aa14e15a..d565ffbdc 100644 > > --- a/html/cgi-bin/proxy.cgi > > +++ b/html/cgi-bin/proxy.cgi > > @@ -3061,6 +3061,8 @@ END > > close(SUBNETS); > > } > > > > + chomp(@templist); > > + > > foreach (@templist) > > { > > @temp = split(/\//); > > @@ -3069,7 +3071,6 @@ END > > ($temp[0] ne $netsettings{'BLUE_NETADDRESS'}) && ($temp[1] ne $netsettings{'BLUE_NETMASK'}) > > ) > > { > > - chomp $temp[1]; > > print FILE " ||\n (isInNet(myIpAddress(), \"$temp[0]\", \"$temp[1]\"))"; > > } > > } > > -- > > 2.16.1 > > > >
diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index 6aa14e15a..d565ffbdc 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -3061,6 +3061,8 @@ END close(SUBNETS); } + chomp(@templist); + foreach (@templist) { @temp = split(/\//); @@ -3069,7 +3071,6 @@ END ($temp[0] ne $netsettings{'BLUE_NETADDRESS'}) && ($temp[1] ne $netsettings{'BLUE_NETMASK'}) ) { - chomp $temp[1]; print FILE " ||\n (isInNet(myIpAddress(), \"$temp[0]\", \"$temp[1]\"))"; } }