Skip to content

Commit

Permalink
Ensure that .com is included
Browse files Browse the repository at this point in the history
  • Loading branch information
apeschar committed Jul 10, 2022
1 parent ec2f510 commit 1b348f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ function arrayToCode(array $data, $level = 0):string {
$comments = [];
}

if (!isset($domains['com'])) {
throw new RuntimeException(".com is missing from public suffix list; it must be corrupted");
}

file_put_contents(__DIR__.'/data.php', "<?php\n\nreturn ".arrayToCode($domains).';');

0 comments on commit 1b348f8

Please sign in to comment.