Limit maximum length of each domain to 253 characters. We should document this somewhere if power users want to add insanely long regex filters, they will have to do this by directly interacting with the database.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2019-08-07 22:25:17 +02:00
parent 965f2083a6
commit e66d0c4a74

View File

@@ -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)."$";