Move validation functions into func.php and use the same validation in all cases.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2021-07-25 16:45:05 +02:00
parent 690feb8b26
commit 03920e3595
6 changed files with 75 additions and 78 deletions

View File

@@ -646,7 +646,7 @@ if ($_POST['action'] == 'get_groups') {
{
// If adding to the exact lists, we convert the domain lower case and check whether it is valid
$domain = strtolower($domain);
if(filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) === false)
if(validDomain($domain))
{
// This is the case when idn_to_ascii() modified the string
if($input !== $domain && strlen($domain) > 0)