Alexander Krotov
d43c225be3
Return None from outlk_autodiscover if no XML config was parsed
2019-10-06 05:16:17 +03:00
B. Petersen
1802d7658d
add some tests for dc_create_outgoing_rfc724_mid()
...
as noticed in the last attempts to change the prefix,
this test is missing (as probably many more :)
2019-10-05 22:48:00 +02:00
B. Petersen
275f5d713f
cargo fmt
2019-10-05 22:47:39 +02:00
B. Petersen
e40cfeec58
bubble up sql, get_abs_path errors
2019-10-05 22:47:39 +02:00
B. Petersen
275b4b8d36
bubble up sql-errors in reveive_imf()
2019-10-05 22:47:39 +02:00
B. Petersen
77cef632c7
bubble up update_param() error
...
bubble up the error instead of ignoring it -
but also do not panic as before #673
2019-10-05 22:47:39 +02:00
B. Petersen
db2064de14
use .to_string_lossy() member of Path, CStr etc.
...
instead of calling to_str().unwrap_or_default().
2019-10-05 22:46:29 +02:00
B. Petersen
e251c7b1c8
redo some c-comments
2019-10-05 15:53:18 +02:00
björn petersen
2fe98775f9
Merge pull request #673 from deltachat/dont-panic
...
Don't Panic!
2019-10-05 15:08:15 +02:00
björn petersen
187179d87b
Merge pull request #674 from deltachat/to-lossy
...
always expect bad c-strings
2019-10-05 15:04:32 +02:00
holger krekel
dd03f6e8af
test and fix that a group with mixed-encryption members (with some we can encrypt, others not) does not break
2019-10-05 15:02:03 +02:00
holger krekel
07b32241bd
try fix #677 (this fixes only a test) -- seems like we passed pointers into Rust strings to code that was expecting null-terminated strings. Now do proper "strdup()" and free. The real proper fix is to make dc_split_armored_string into a rust-string function and do away with all c-pointers.
2019-10-05 15:01:28 +02:00
B. Petersen
abfff96cd4
cargo fmt
2019-10-05 12:44:08 +02:00
B. Petersen
735bdd1c20
always use to_string_lossy() for converting c-strings to String
...
the function to_string() is removed;
c-strings may always be badly formatted and this should never lead to a panic.
2019-10-05 00:12:32 +02:00
B. Petersen
9cae075b6f
target detailed checks of @flub
2019-10-04 23:07:34 +02:00
B. Petersen
2317518e5e
cargo fmt
2019-10-04 23:07:34 +02:00
B. Petersen
477af413c6
if in doubt, prefer unwrap_or_default()
...
if the past we had lots of crashes because of unexpected unwrap failures,
mostly related to string.
this commit avoids them eg. for string-conversions that may panic
eg. when encountering a null-byte or by logical programming errors
where an object is assumed to be set but is not under unexpected circumstances.
2019-10-04 23:07:33 +02:00
B. Petersen
93f0f5ccae
rename sql-config-setters to set_raw_config*()
...
the rename is reasonable as the getter is called get_raw_config*()
and to make the functional difference to context.set|get_config() clearer.
2019-10-04 11:18:26 +02:00
B. Petersen
79b92727cc
prefer get_config_bool() where appropriate
...
for db input/output, we still use get_config_int() to convert to/from 0/1.
also for info() we prefer get_config_int() to show the real value.
2019-10-04 11:15:11 +02:00
björn petersen
8dfd04672f
Merge pull request #670 from deltachat/tweak-config
...
tweak config
2019-10-03 21:19:45 +02:00
holger krekel
603761e4b7
add DC_EVENT_DELETED_BLOB_FILE
2019-10-03 18:01:56 +02:00
holger krekel
467c09f491
introduce DC_EVENT_NEW_BLOB_FILE event and test for it
2019-10-03 18:01:56 +02:00
B. Petersen
a953b494cb
cargo fmt
2019-10-03 17:41:09 +02:00
B. Petersen
dca9afa10b
rename sql.get_config() to sql.get_raw_config() to make clearer that there is not default handling
2019-10-03 17:35:43 +02:00
B. Petersen
23d2d87c24
do not panic on missing or wrong formatted values in the database
2019-10-03 17:15:40 +02:00
B. Petersen
c6b2d640ae
prefer context.get_config() over context.sql.get_config() as the latter does not handle default values.
2019-10-03 17:15:40 +02:00
björn petersen
b4b8a1d15b
Merge pull request #667 from deltachat/resilient-writes
...
more resilient database writes
2019-10-03 14:48:21 +02:00
Alexander Krotov
130d485cac
Fix some clippy warnings
2019-10-03 14:30:40 +02:00
B. Petersen
d5b92744ed
increase number of simultan database-connections, wait for write if another thread writes
...
- increase the number of simultan database-connections handled by the r2d2 pool.
currently we have already at least 5 threads threads,
but also the ui may call from any thread.
- the busy-timeout for all connections is set to 10 seconds.
this means, if a connection-A wants to write,
but connection B-is already writing,
connection-A waits multiple times a few ms and tries over.
this is repeated until the 10 seconds are accumulated.
2019-10-03 14:09:43 +02:00
Alexander Krotov
a5c4e16405
Merge pull request #647 from deltachat/tls_checks_config
...
Add certificate check configuration options
2019-10-02 23:21:03 +00:00
Alexander Krotov
216266d7bf
Apply imap_certificate_checks config to StartTLS connections
2019-10-03 02:02:51 +03:00
Alexander Krotov
bf1652a1be
Move common code for IMAP and SMTP to login_param.rs
2019-10-03 01:26:38 +03:00
Alexander Krotov
f93f3d6012
Do not set minimal TLS version for SMTP manually
2019-10-03 01:26:07 +03:00
Alexander Krotov
41806f86ba
Return certificate check information from get_info()
2019-10-03 01:26:07 +03:00
Alexander Krotov
59df97944f
Enable strict certificate checks for test online accounts
2019-10-03 01:26:07 +03:00
Alexander Krotov
468651534e
Manually specify values for CertificateChecks enum
...
This is what we are doing in constants.rs
2019-10-03 01:26:07 +03:00
Alexander Krotov
6343ae8161
Rename {mail,send}_certificate_checks into {imap,smtp}_certificate_checks
2019-10-03 01:26:07 +03:00
Alexander Krotov
641bd5eb15
Write configured_{mail,send}_certificate_checks to database
2019-10-03 01:26:07 +03:00
Alexander Krotov
063d989225
Use mail_certificate_checks configuration in imap.rs
2019-10-03 01:26:07 +03:00
Alexander Krotov
b8ca7b1591
Add CertificateChecks::Automatic option and make it default
...
It is the same as AcceptInvalidCertificates for now,
but can be replaced with better heuristics later,
such as a database of known providers or TOFU.
2019-10-03 01:25:19 +03:00
Alexander Krotov
e222f49c9d
Use send_certificate_checks configuration
2019-10-03 01:25:19 +03:00
Alexander Krotov
297bc635e8
Add certificate check configuration options
2019-10-03 01:25:19 +03:00
holger krekel
230c65594c
add test for markseen not sending out smtp on second call
2019-10-02 23:51:14 +02:00
holger krekel
509a21ff05
introduce DC_IMAP_MESSAGE_MOVED event and try harder to send out MDNs
2019-10-02 23:51:14 +02:00
holger krekel
96066712bd
add and test for DC_IMAP_MESSAGE_DELETED event
2019-10-02 23:51:14 +02:00
holger krekel
d83aa1e898
perform heuristic moves only if a job is not delete
2019-10-02 23:51:14 +02:00
holger krekel
f0a7bdb6d6
properly parse message ids in imap prefetch
2019-10-02 23:51:14 +02:00
holger krekel
9c077c98cd
remove MdnSent logic
2019-10-02 23:51:14 +02:00
holger krekel
6dc45642b7
rework API
2019-10-02 23:51:14 +02:00
holger krekel
5c1b9c83f7
fixes #661 and also contains a cleanup of config access (only for e2ee and mdns)
2019-10-02 22:51:09 +02:00