[Web] Use INTL_IDNA_VARIANT_UTS46 in idn_to_ascii (thanks to @Knight1 !)

[Web] Some PHP fixes (warnings, notices)
[Web] Add quota notification tools
This commit is contained in:
andryyy
2019-02-05 00:10:21 +01:00
parent 21741dc061
commit 1e764009bf
25 changed files with 237 additions and 98 deletions

View File

@@ -26,7 +26,7 @@ function policy($_action, $_scope, $_data = null) {
);
return false;
}
$object = idn_to_ascii(strtolower(trim($object)));
$object = idn_to_ascii(strtolower(trim($object)), 0, INTL_IDNA_VARIANT_UTS46);
}
else {
$_SESSION['return'][] = array(
@@ -183,7 +183,7 @@ function policy($_action, $_scope, $_data = null) {
);
continue;
}
$object = idn_to_ascii(strtolower(trim($object)));
$object = idn_to_ascii(strtolower(trim($object)), 0, INTL_IDNA_VARIANT_UTS46);
}
else {
$_SESSION['return'][] = array(
@@ -277,7 +277,7 @@ function policy($_action, $_scope, $_data = null) {
if (!hasDomainAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $_data)) {
return false;
}
$_data = idn_to_ascii(strtolower(trim($_data)));
$_data = idn_to_ascii(strtolower(trim($_data)), 0, INTL_IDNA_VARIANT_UTS46);
}
// WHITELIST