Fix permissive regex

The `\.?` is too permissive, letting in anything that ends in the domain

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2018-07-31 22:17:25 -04:00
parent b7ad22c51e
commit 57698ba45a

View File

@@ -37,7 +37,7 @@ switch($type) {
// Escape "." so it won't be interpreted as the wildcard character
$domain = str_replace(".","\.",$_POST['domain']);
// Add regex filter for legacy wildcard behavior
add_regex("\.?".$domain."$");
add_regex("(^|\.)".$domain."$");
break;
case "regex":
add_regex($_POST['domain']);