-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when opening server configuration for accounts imported from DC desktop #3408
Comments
On my phone, there is only "Settings / Advanced / Password and Account", is this what you mean? |
The stack trace looks like one of the spinners (imap_security, smtp_security, auth_method, or cert_check) was set to an invalid value. Maybe cert_check, because it's the only one with exactly 3 possible values. What I don't understand is why there seems to be a fourth possible value on DC Desktop. On the DC Desktop from where you exported your chats. Can you go to "Help / About Delta Chat" and tell the value of "imap certificate checks"? Or alternatively, in "Help / About Delta Chat", scroll down to "Copy JSON", paste the result here, and remove personal information before you post it here on GitHub (esp. it contains your email address) |
yip, it is the crash is repproducible by changing RegistrationActivitiy.java, line228 to for fixing we need to make sure, the read config are inside the range wondering, why recent desktop sets that to (came to that while searching if there was a PR for fixing that, i am not on a fix currently :) |
Desktop is right to set it to 3 - excerpt from deltachat.h: /**
* @defgroup DC_CERTCK DC_CERTCK
*
* These constants configure TLS certificate checks for IMAP and SMTP connections.
*
* These constants are set via dc_set_config()
* using keys "imap_certificate_checks" and "smtp_certificate_checks".
*
* @addtogroup DC_CERTCK
* @{
*/
/**
* Configure certificate checks automatically.
*/
#define DC_CERTCK_AUTO 0
/**
* Strictly check TLS certificates;
* requires that both the certificate and the hostname are valid.
*/
#define DC_CERTCK_STRICT 1
/**
* Accept invalid certificates, including self-signed ones
* or having incorrect hostname.
*/
#define DC_CERTCK_ACCEPT_INVALID_CERTIFICATES 3 0, 1, and 3 are valid. DC Android tries to have the correct behavior here in <string-array name="pref_dc_certck_entries">
<item>@string/automatic</item>
<item>@string/strict</item>
<item>@string/accept_invalid_certificates</item>
</string-array>
<string-array name="pref_dc_certck_values">
<item>0</item>
<item>1</item>
<item>3</item>
</string-array> which is used from <Spinner
[...]
android:entries="@array/pref_dc_certck_entries"
android:entryValues="@array/pref_dc_certck_values" but for some reason this doesn't work. I'll try to make a fix that simply doesn't use |
Now I'm confused. The rust code says that both 2 and 3 are OK, but 3 is deprecated? /// Accept certificates that are expired, self-signed
/// or otherwise not valid for the server hostname.
AcceptInvalidCertificates = 2,
/// Alias for `AcceptInvalidCertificates`
/// for API compatibility.
AcceptInvalidCertificates2 = 3, Edit: Core doesn't include any code to make all |
is |
To me, the comment "Alias for
Yes, that's correct. |
this seems to be deprecated, if it is only an alias for the real value, 2 |
this PR changes `DC_CERTCK_ACCEPT_*` to the same values in cffi as rust does. and regards the same values as deprecated afterwards there is some confusion about what is deprecated and what not, see deltachat/deltachat-android#3408 iOS needs to be adapted as it was following the docs in the CFFI before, same desktop. both need to be graceful on reading and strict on writing. ~~**this PR is considered harmful,** so we should not merge that in during 1.48 release, there is no urgency, things are fine (wondering if it isn't even worth the effort, however, having different values and deprecations is a call for trouble in the future ...)~~ --------- Co-authored-by: iequidoo <117991069+iequidoo@users.noreply.github.com>
The text was updated successfully, but these errors were encountered: