Skip to content
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

Decrypt OMEMO file transfer #1001

Closed
Tuxicoman2 opened this issue Jan 13, 2021 · 7 comments
Closed

Decrypt OMEMO file transfer #1001

Tuxicoman2 opened this issue Jan 13, 2021 · 7 comments

Comments

@Tuxicoman2
Copy link

Hi,

1/ I send files from Conversations or Dino using OMEMO to JSXC 4.2.1, I expect to be able to open the file from JSXC.
However what I get in JSXC is an URL aesgcm://...
When clicking on the URL, the web browser can't open the file.

2/ I send files from JSXC 4.2.1 using OMEMO to Conversations or Dino. I expect to be able to open the file in Conversations or Dino..
However what I get in Conversations or Dino is an URL aesgcm://... as text message
I can't do anything with that.

@Tuxicoman2
Copy link
Author

Tuxicoman2 commented Jan 13, 2021

I have the same behavior with 4.2.1-git.2a20ca67
1/ Even if a new tab is opened when clicking on the link, the browser can't do anything with aesgcm://... url.
Adding the http_upload domain in the trusted domains list in the JSXC settings doesn't change the behavior

@mightymop
Copy link
Collaborator

This is related to:
#989

@Tuxicoman2
Copy link
Author

I'm using Dino 0.2.0 on Debian testing and Conversations 2.9.3+fcr From Fdroid

@Tuxicoman2
Copy link
Author

I inspected a picture sent by Dino through OMEMO.

in plugin/omemo/Plugin.ts,
decrypted.plaintext variable value is 'aesgcm://upload.jesuislibre.net:5281/upload/fQUnFfE0raNWs_bp/figure-fig1.png#e34bbfdc8519e8008fd391ad3dfdde4a786e0baec53194e9ffb97a034a347d26a2cc014bdfac3d108951d423'

Thus we validate the (decrypted.plaintext.indexOf('aesgcm://') === 0) and go into processEncryptedAttachment()

We arrive to attachment.setData(match) where match value is 'aesgcm://upload.jesuislibre.net:5281/upload/fQUnFfE0raNWs_bp/figure-fig1.png#e34bbfdc8519e8008fd391ad3dfdde4a786e0baec53194e9ffb97a034a347d26a2cc014bdfac3d108951d423'

I don't see until this point where the attachment data is fetched and decrypted.

@sualko
Copy link
Member

sualko commented Jan 13, 2021

Thanks for reporting those issues.

  1. JSXC sends only encrypted files, but is not able to decrypt them. The reason for this is, that we want to protect the users privacy and don't download any image (similar to most mail clients). @mightymop was working on this lately and maybe we extend his approach a bit further.

  2. This is the issue described in Pictures not displaying as pictures #989, but until now I had no time to look into it. We will track the progress there.

I leave this issue open to track the progress for the decrypt attachment feature.

@sualko sualko changed the title File transfer from/to Conversations or Dino with OMEMO Decrypt OMEMO file transfer Jan 13, 2021
@Tuxicoman2
Copy link
Author

OK, thanks.
Maybe just displaying a "not supported yet" message in the UI instead of an URL would be helpful.

@sualko
Copy link
Member

sualko commented Jan 14, 2021

Maybe just displaying a "not supported yet" message in the UI instead of an URL would be helpful.

That's probably a good idea.

@sualko sualko closed this as completed in 8ddaf68 Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants