From f6b01fb36b420bb7cbf457523860374a5443515d Mon Sep 17 00:00:00 2001 From: John Peacock Date: Fri, 24 Sep 2004 18:56:35 +0000 Subject: [PATCH] * lib/Qpsmtpd/Address.pm Change subdomain regex to match single character subdomains (Robert Spier) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@332 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd/Address.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Qpsmtpd/Address.pm b/lib/Qpsmtpd/Address.pm index fd99fd6..90f7530 100644 --- a/lib/Qpsmtpd/Address.pm +++ b/lib/Qpsmtpd/Address.pm @@ -115,7 +115,7 @@ sub canonify { my $atom = '[a-zA-Z0-9!#\$\%\&\x27\*\+\x2D\/=\?\^_`{\|}~]+'; my $address_literal = '(?:\[(?:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|IPv6:[0-9A-Fa-f:.]+)\])'; - my $subdomain = '(?:[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9]))'; + my $subdomain = '(?:[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?)'; my $domain = "(?:$address_literal|$subdomain(?:\.$subdomain)*)"; my $qtext = '[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]'; my $text = '[\x01-\x09\x0B\x0C\x0E-\x7F]';