Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
perl-IO-Socket-SSL
IO-Socket-SSL-1.16-verify_hostname.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File IO-Socket-SSL-1.16-verify_hostname.diff of Package perl-IO-Socket-SSL
--- SSL.pm +++ SSL.pm @@ -1078,7 +1078,7 @@ $ip4 = inet_aton( $identity ) or croak "'$identity' is not IPv4, but neither IPv6 nor hostname"; } else { # assume hostname - if ( $identity !~m{^[a-zA-Z0-9-_\.]+$} ) { + if ( $identity !~m{^[\w\-\.]+$} ) { $identity = idn_to_ascii($identity) or croak "Warning: Given name '$identity' could not be converted to IDNA!"; } @@ -1100,7 +1100,7 @@ } elsif ( $wtyp eq 'leftmost' and $name =~m{^\*(\..+)$} ) { $pattern = qr{^[\w\-]*\Q$1\E$}i; } else { - $pattern = qr{^\Q$name}i; + $pattern = qr{^\Q$name\E$}i; } return $identity =~ $pattern; }; --- t/verify_hostname.t +++ t/verify_hostname.t @@ -25,7 +25,7 @@ ( eval { require Net::LibIDN } || eval { require Net::IDN::Encode } ); $|=1; -my $max = 37; +my $max = 40; $max+=3 if $can_idn; print "1..$max\n"; @@ -88,6 +88,7 @@ 'www-13.lala.other.local' => [], 'smtp.mydomain.local' => [qw(smtp ldap www)], 'xn--lwe-sna.idntest.local' => [qw(smtp ldap www)], + 'smtp.mydomain.localizing.useless.local' => [], ); if ( $can_idn ) { # check IDN handling
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor