fix: default to strict TLS checks if not configured

If user has not set any settings manually
and provider is not configured,
default to strict TLS checks.

Bug was introduced in
<https://github.com/deltachat/deltachat-core-rust/pull/5854>
(commit 6b4532a08e)
and affects released core 1.142.4 and 1.142.5.

The problem only affects accounts configured
using these core versions with provider
not in the provider database or when using advanced settings.
This commit is contained in:
link2xt
2024-08-15 15:34:33 +00:00
parent 7432c6de84
commit a268946f8d
2 changed files with 14 additions and 3 deletions

View File

@@ -265,9 +265,7 @@ impl LoginParam {
| CertificateChecks::AcceptInvalidCertificates2 => Some(false),
};
let provider_strict_tls = self.provider.map(|provider| provider.opt.strict_tls);
user_strict_tls
.or(provider_strict_tls)
.unwrap_or(self.socks5_config.is_some())
user_strict_tls.or(provider_strict_tls).unwrap_or(true)
}
}