File: fix-handling-of-trailing-dot.patch

package info (click to toggle)
libdomain-publicsuffix-perl 0.19-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 472 kB
  • sloc: perl: 12,192; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 510 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: Properly handle trailing dots
Author: Axel Beckert <abe@debian.org>
Bug: https://github.com/nmelnick/Domain-PublicSuffix/issues/9
Forwarded: https://github.com/nmelnick/Domain-PublicSuffix/pull/10

--- a/lib/Domain/PublicSuffix.pm
+++ b/lib/Domain/PublicSuffix.pm
@@ -215,7 +215,7 @@
 		$self->root_domain($suffix);
 	} else {
 		my $root_domain = $domain;
-		$root_domain =~ s/^.*\.(.*?\.$suffix)$/$1/;
+		$root_domain =~ s/^.*\.(.*?\.$suffix)\.?$/$1/;
 		$self->root_domain($root_domain);
 	}