소스 검색

[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>
Ashus 5 년 전
부모
커밋
00f5f744d0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      data/web/inc/functions.dkim.inc.php

+ 1 - 1
data/web/inc/functions.dkim.inc.php

@@ -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),