Skip internal vacation target validation

This commit is contained in:
Rodrigo Cortés Cano authored and Christian Boltz committed 2026-07-22 18:13:16 +00:00
1 parent 9a9078ce21
commit 8d631d2ce8
2 files changed
+8 -1

No files matched your search

+7
View File
@@ -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
+1 -1
View File
@@ -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();