Changeset 884 for trunk


Ignore:
Timestamp:
06/16/16 17:55:53 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Allow comma-separated entries and dash-based range entries in the VLAN field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/main.cgi

    r883 r884  
    10201020    $webvar{vlan} =~ s/^\s+//;
    10211021    $webvar{vlan} =~ s/\s+$//;
     1022    # Then any surrounding a comma
     1023    $webvar{vlan} =~ s/\s*,\s*/,/g;
    10221024    # ...  ve make it ze configurable thingy!
    10231025    if ($IPDB::numeric_vlan) {
    1024       if ($webvar{vlan} !~ /^\d+$/) {
     1026      if ($webvar{vlan} !~ /^[\d,-]+$/) {
    10251027        $page->param(err => "VLANs must be numeric");
    10261028        return;
    10271029      }
    10281030    } else {
    1029       if ($webvar{vlan} !~ /^[\w\d_.-]+$/) {
     1031      if ($webvar{vlan} !~ /^[\w\d_.,-]+$/) {
    10301032        $page->param(err => "VLANs must be alphanumeric");
    10311033        return;
Note: See TracChangeset for help on using the changeset viewer.