Changeset 831 for trunk


Ignore:
Timestamp:
03/24/22 13:23:30 (3 years ago)
Author:
Kris Deugau
Message:

/trunk

Refine the regex in _maybeip() for slightly better validation and excluding
the wildcard possibility of \d matching outside [0-9] in some locales

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r828 r831  
    402402sub _maybeip {
    403403  my $izzit = shift;  # reference
    404   return 1 if $$izzit =~ m,^(?:[\d\./]+|[0-9a-fA-F:/]+)$,;
     404  return 1 if $$izzit =~ m,^(?:[0-9\.]+|[0-9a-fA-F:]+)(?:/[0-9]+)?$,;
    405405}
    406406
Note: See TracChangeset for help on using the changeset viewer.