mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
Skip internal vacation target validation
This commit is contained in:
1 parent
9a9078ce21
commit
8d631d2ce8
2 files changed
+8
-1
No files matched your search
@@ -434,6 +434,13 @@ class AliasHandler extends PFAHandler
|
||||
$errors = array();
|
||||
|
||||
foreach ($val as $singlegoto) {
|
||||
# setmore() removes this internal target and restores it only from
|
||||
# the stored vacation state, so it must not be validated as a
|
||||
# user-managed external destination first.
|
||||
if (!$this->new && $singlegoto === $this->getVacationAlias()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (substr($this->id, 0, 1) == '@' && substr($singlegoto, 0, 1) == '@') { # domain-wide forward - check only the domain part
|
||||
# only allowed if $this->id is a catchall
|
||||
# Note: alias domains are better, but we should keep this way supported for backward compatibility
|
||||
|
||||
@@ -210,7 +210,7 @@ class AliasHandlerTest extends \PHPUnit\Framework\TestCase
|
||||
'forward@example.net',
|
||||
],
|
||||
'goto_mailbox' => 1,
|
||||
]));
|
||||
]), json_encode($handler->errormsg));
|
||||
$this->assertTrue($handler->save(), json_encode($handler->errormsg));
|
||||
|
||||
$stored = new AliasHandler();
|
||||
|
||||
Reference in new issue
Block a user