[v2,3/4] proxy.cgi: strip newline from subnet parameter
Commit Message
$temp[1] might end with a newline; this is unavoidable when specifying
serveral subnets. Thus, 'chomp $temp[1];' has to be moved before the
comparisons with the green and blue subnets. Otherwise the comparison
might always be wrong due to the newline.
---
html/cgi-bin/proxy.cgi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -3064,12 +3064,12 @@ END
foreach (@templist)
{
@temp = split(/\//);
+ chomp $temp[1];
if (
($temp[0] ne $netsettings{'GREEN_NETADDRESS'}) && ($temp[1] ne $netsettings{'GREEN_NETMASK'}) &&
($temp[0] ne $netsettings{'BLUE_NETADDRESS'}) && ($temp[1] ne $netsettings{'BLUE_NETMASK'})
)
{
- chomp $temp[1];
print FILE " ||\n (isInNet(myIpAddress(), \"$temp[0]\", \"$temp[1]\"))";
}
}