Changeset 60 for trunk


Ignore:
Timestamp:
03/10/15 12:26:24 (9 years ago)
Author:
Kris Deugau
Message:

/trunk/dnsbl

Strip leading and trailing whitespace on IP, netblock, and org fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dnsbl/dnsbl.cgi

    r59 r60  
    9999  $page->param(dnsblsiteroot => $dnsblsiteroot);
    100100
     101  $webvar{ip} =~ s/^\s*//;
     102  $webvar{ip} =~ s/\s*$//;
    101103  $page->param(ip => $webvar{ip});
    102104  my $count = $dnsbl->ipexists($webvar{ip});
     
    123125  my $err = '';
    124126
     127  $webvar{ip} =~ s/^\s*//;
     128  $webvar{ip} =~ s/\s*$//;
     129
    125130  # basic algo:  for each listing level, add the org and block if not already present.
    126131  # escape the loop if we check a level with no block entered.
     
    132137    my $orgn = "org$i";
    133138    my $blockn = "block$i";
     139    $webvar{$orgn} =~ s/^\s*//;
     140    $webvar{$orgn} =~ s/\s*$//;
     141    $webvar{$blockn} =~ s/^\s*//;
     142    $webvar{$blockn} =~ s/\s*$//;
    134143    my $orgid = $dnsbl->orgexists($webvar{$orgn});
    135144    if (!$orgid) {
Note: See TracChangeset for help on using the changeset viewer.