You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search for usages of MessageObject.file, check where it's passed, and make sure that all it's never used to check the file extension, to pass it to an external application, or to show it to the user.
Look at places in the code where a filename is user-visible, like when viewing it in the UI or passing it to an external application (especially when sharing or opening it). Check where the filename comes from, and make sure that it comes from filename, not from file.
Test that
sharing to and from DC
opening
saving ("Export attachment")
drafting and re-entering the chat
opening the drafted file once more
sending
still works for a) Images b) Videos c) vCards (attached contacts) d) attached files e) webxdc's. Also that editing and previewing drafted images works, and that previewing drafted videos works. (I hope I didn't forget to test any combination)
Then Desktop will be ready for using core with deltachat/deltachat-core-rust#6332 merged. Received files will be deduplicated then, but outgoing files not yet.
For deduplicating outgoing files, I will need to add a new JsonRPC API or modify the existing one to use set_file_and_deduplicate() instead of set_file() (or alternatively, one of you could do that). I will need to ask one of you how you are using the API so that I can design it in a way that works well for you. And then of course, you will need to create a Desktop PR similar to deltachat/deltachat-android#3513 that uses this new/changed API.
We want to deduplicate blob files by always setting the file name to be the hash of the file content. Core issue: deltachat/deltachat-core-rust#6265, core PR: deltachat/deltachat-core-rust#6332
To be done:
dc_msg_get_filename()
(C-FFI) orMessageObject.file_name
(JsonRPC) needs to be used, similar to the Android PR at fix: Use getFilename() instead of the actual filename on disk deltachat-android#3521.MessageObject.file
, check where it's passed, and make sure that all it's never used to check the file extension, to pass it to an external application, or to show it to the user.filename
, not fromfile
.sharing to and from DC
opening
saving ("Export attachment")
drafting and re-entering the chat
opening the drafted file once more
sending
still works for a) Images b) Videos c) vCards (attached contacts) d) attached files e) webxdc's. Also that editing and previewing drafted images works, and that previewing drafted videos works. (I hope I didn't forget to test any combination)
Then Desktop will be ready for using core with deltachat/deltachat-core-rust#6332 merged. Received files will be deduplicated then, but outgoing files not yet.
For deduplicating outgoing files, I will need to add a new JsonRPC API or modify the existing one to use
set_file_and_deduplicate()
instead ofset_file()
(or alternatively, one of you could do that). I will need to ask one of you how you are using the API so that I can design it in a way that works well for you. And then of course, you will need to create a Desktop PR similar to deltachat/deltachat-android#3513 that uses this new/changed API.The text was updated successfully, but these errors were encountered: