[Web] Allow underscore and hyphen in DKIM selector (#3643)

This change allows to have cleaner DNS zones as mail security related entries usually begin with _.

Co-authored-by: Václav Silber <vaclav.silber@poski.com>
master
Ashus 2020-07-09 15:40:44 +02:00 committed by GitHub
parent ca4e13d517
commit 00f5f744d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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