mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 03:10:18 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user