Merge pull request #6182 from mailcow/fix/4518

[Web] allow dots in dkim selectors
This commit is contained in:
FreddleSpl0it 2024-11-20 13:11:34 +01:00 committed by GitHub
commit 6af907cff0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,7 @@ function dkim($_action, $_data = null, $privkey = false) {
); );
continue; continue;
} }
if (!ctype_alnum(str_replace(['-', '_'], '', $dkim_selector))) { if (!ctype_alnum(str_replace(['-', '_', '.'], '', $dkim_selector))) {
$_SESSION['return'][] = array( $_SESSION['return'][] = array(
'type' => 'danger', 'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data), 'log' => array(__FUNCTION__, $_action, $_data),
@ -188,7 +188,7 @@ function dkim($_action, $_data = null, $privkey = false) {
return false; return false;
} }
} }
if (!ctype_alnum($dkim_selector)) { if (!ctype_alnum(str_replace(['-', '_', '.'], '', $dkim_selector))) {
$_SESSION['return'][] = array( $_SESSION['return'][] = array(
'type' => 'danger', 'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data), 'log' => array(__FUNCTION__, $_action, $_data),