]> the.earth.li Git - autodns.git/commitdiff
Allow up to 6 character TLDs.
authorJonathan McDowell <noodles@earth.li>
Tue, 21 Mar 2006 19:35:35 +0000 (19:35 +0000)
committerJonathan McDowell <noodles@earth.li>
Tue, 21 Mar 2006 19:35:35 +0000 (19:35 +0000)
.travel and .museum are 6 characters long, so increase our previous TLD
limit from 4 to 6.

git-archimport-id: noodles@earth.li--pie/autodns--mainline--1.0--patch-16

autodns.pl

index 67beb7a92a8f9c65cc003298d9bf0ae2915421ee..fa4e09b6a337cb4005e18f1a2b62d126ad5e3571 100755 (executable)
@@ -74,7 +74,7 @@ sub valid_domain($) {
        my $domain = shift;
        $domain = lc $domain;
 
-       if ($domain =~ /^(?:[a-z0-9-]+\.)+[a-z]{2,4}$/) {
+       if ($domain =~ /^(?:[a-z0-9-]+\.)+[a-z]{2,6}$/) {
                return 1;
        } elsif ($domain =~ /^(?:[0-9\/-]+\.)+in-addr.arpa$/) {
                return 1;