diff --git a/scripts/pi-hole/php/database.php b/scripts/pi-hole/php/database.php index 319a3260..d3ac258b 100644 --- a/scripts/pi-hole/php/database.php +++ b/scripts/pi-hole/php/database.php @@ -89,6 +89,10 @@ function add_to_table($db, $table, $domains, $wildcardstyle=false, $returnnum=fa $num = 0; foreach($domains as $domain) { + // Limit max length for a domain entry to 253 chars + if(strlen($domain) > 253) + continue; + if($wildcardstyle) $domain = "(\\.|^)".str_replace(".","\\.",$domain)."$";