[Dovecot][Web] imapsync: restrict custom parameters and source hosts, verify certificates

This commit is contained in:
FreddleSpl0it committed 2026-11-02 09:49:03 +01:00
1 parent bab03ed88b
commit a1cbd51d70
5 files changed
+63 -10

No files matched your search

@@ -132,6 +132,16 @@ class CustomParamsTest extends TestCase
$this->assertSame(['default' => true], CustomParams::allowlist(['bad name' => true], ['default' => true]));
}
public function testBlockedOptionsAreNeverAllowed(): void
{
$allowlist = CustomParams::allowlist(['tests' => false, 'pipemess' => true, 'folder' => true], ['abort' => false]);
$this->assertSame(['folder' => true], $allowlist);
$this->assertSame([], CustomParams::allowlist([], ['abort' => false, 'showpasswords' => false]));
$this->expectException(UserError::class);
CustomParams::toJson([['o' => '--tests', 'v' => '']], $allowlist);
}
public function testOldWhitelistFormatIsIgnored(): void
{
$errorLog = ini_set('error_log', '/dev/null');