mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 02:39:25 +01:00
Add support for international domain names. Note that this relies on php-intl to be installed
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -16,17 +16,23 @@ if (empty($api)) {
|
||||
list_verify($list);
|
||||
}
|
||||
|
||||
// Split individual domains into array
|
||||
$domains = preg_split('/\s+/', trim($_POST['domain']));
|
||||
$comment = trim($_POST['comment']);
|
||||
|
||||
// Convert domain name to IDNA ASCII form for international domains
|
||||
foreach($domains as &$domain)
|
||||
{
|
||||
$domain = idn_to_ascii($domain);
|
||||
}
|
||||
|
||||
// Only check domains we add to the exact lists.
|
||||
// Regex are validated by FTL during import
|
||||
$check_lists = ["white","black","audit"];
|
||||
if(in_array($list, $check_lists)) {
|
||||
check_domain();
|
||||
check_domain($domains);
|
||||
}
|
||||
|
||||
// Split individual domains into array
|
||||
$domains = preg_split('/\s+/', trim($_POST['domain']));
|
||||
$comment = trim($_POST['comment']);
|
||||
|
||||
require_once("func.php");
|
||||
require_once("database.php");
|
||||
$GRAVITYDB = getGravityDBFilename();
|
||||
|
||||
Reference in New Issue
Block a user