fix: guard validation helpers against undef host
This commit is contained in:
1 parent
4d48f90ceb
commit
86007a74d8
1 file changed
+1
@@ -58,6 +58,7 @@ sub sanitize_url {
|
||||
return undef if $authority =~ /[\s\x00-\x1F\x7F]/;
|
||||
|
||||
my $hostport = ( split /\@/, $authority )[-1];
|
||||
return undef unless defined $hostport && length $hostport;
|
||||
my $host_raw;
|
||||
if ( $hostport =~ /^\[(.+)\](?::\d+)?$/ ) {
|
||||
$host_raw = $1;
|
||||
|
||||
Reference in new issue
Block a user