[Dovecot][Web] imapsync: verify certificates against the source host, make the check optional per source

This commit is contained in:
FreddleSpl0it committed 2026-11-03 09:31:16 +01:00
1 parent a4b60ae26f
commit a8d1121f0e
13 files changed
+126 -18

No files matched your search

@@ -122,7 +122,7 @@ class SourceService
$this->applyScope($source, $input['scope'] ?? $current->scope, $input['domains'] ?? [], $input['users'] ?? []);
}
$connectionChanged = self::connection($current) !== self::connection($source);
if ($connectionChanged) {
if ($connectionChanged || ($current->verifyCert && !$source->verifyCert)) {
$this->requireAllJobsAccessible($source);
}
$this->repo->update($source, $writeTargets, $connectionChanged);
@@ -296,6 +296,7 @@ class SourceService
$source->host = $host;
$source->port = $port;
$source->enc = $enc;
$source->verifyCert = isset($input['verify_cert']) ? (int)!empty($input['verify_cert']) : $source->verifyCert;
$source->authType = $authType;
$source->active = isset($input['active']) ? (int)$input['active'] : $source->active;
}