Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

[BUG] OTR leaks image and file uploads

Open localguru opened this issue 9 years ago • 27 comments

Rocket.Chat Version: 0.56.0, 0.57.1, 0.57.3 0.58.2 0.58.4 0.60.0-rc.1 0.61.0, 0.69.2, 2.2.0, 2.4.5 Running Instances: 1 DB Replicaset OpLog: yes Node Version: 4.5

When uploading an image or a file in a OTR session, those uploads are not displayed. After finishing the OTR session and reloading browser those uploads are displayed. Concerning the image part this is duplicate to #6151

There are several open bugs regarding OTR: #6907 #6526 #6151

OTR is a main security feature and should work as expected. Referring to the current discussion "State of Rocket.Chat?" #7476 these are some of the long unfixed no-go bugs, why the "sentiment is turning a little sour". I'm a SysAdmin not a programmer. So my feedback to the community is testing and reporting bugs. Ignoring those critical bugs over such a long time, absorbs the enthusiasm for RC I had when starting a few months ago.

localguru avatar Jul 16 '17 21:07 localguru

Same here.

choltkamp avatar Jul 18 '17 10:07 choltkamp

Same here.

ghost avatar Jul 18 '17 11:07 ghost

Same here.

jthomae1 avatar Jul 18 '17 13:07 jthomae1

same here.

hdralx avatar Jul 19 '17 15:07 hdralx

Still in 0.57.3

localguru avatar Aug 12 '17 17:08 localguru

Still in 0.58.2 ;)

localguru avatar Sep 11 '17 12:09 localguru

we would also like to see this fixed..

bbrauns avatar Sep 12 '17 08:09 bbrauns

Me too; without this feature Rocket.Chat makes no sense.

ghost avatar Sep 12 '17 11:09 ghost

Still in 0.58.4

localguru avatar Oct 16 '17 20:10 localguru

Still a problem on 0.60.0-rc.1, tested on demo.rocket.chat

localguru avatar Dec 14 '17 22:12 localguru

Hi folks,

I just re-tested this with @localguru and can still confirm this. It looks like - just like in a non-OTR session - a file upload just does a POST request to https://open.rocket.chat/ufs/GoogleCloudStorage:Uploads/SOMEOTHERID?token=TOKEN&progress=0.3057800339672645 and gets written to mongoDB.

This does obviously undermine the DENIABILITY aspect of OTR.

Without knowing the code, I would guess one of the following things should be done:

  • also forward the OTR file upload to the websocket session that is OTR encrypted (which obviously isn't done right now)
  • OR just don't offer the file upload feature in OTR sessions until this bug is fixed.

Cheers Thomas

TwizzyDizzy avatar Dec 14 '17 23:12 TwizzyDizzy

Not an easy problem to solve. For fileupload to really be considered part of OTR it would have to actually be encrypted before uploaded by client, and then some how decrypted on the other end.

So really the only solution here until someone were able to solve the more complicated problem would be to actually disable file sharing on OTR sessions or warn them every time they send a file in an OTR session.

geekgonecrazy avatar Dec 15 '17 00:12 geekgonecrazy

@mrinaldhar This maybe something you may already be aware of and have fixed in your improved e2e implementation with GSOC?

geekgonecrazy avatar Dec 15 '17 00:12 geekgonecrazy

So really the only solution here until someone were able to solve the more complicated problem would be to actually disable file sharing on OTR sessions or warn them every time they send a file in an OTR session.

Yes, I agree with you on that. Either disable or show a crystal-clear warning, that this upload won't be part of OTR. Until it is fixed.

Cheers & thanks for getting back Thomas

TwizzyDizzy avatar Dec 15 '17 00:12 TwizzyDizzy

Hi, the current implementation of OTR doesn't handle file uploads. I think we should display some sort of warning suggesting that file uploads will not be encrypted when people try to use OTR.

#7181 is a new implementation of end to end encryption in rocket chat, and it handles direct messaging, private group messaging, as well as file uploads. Files are encrypted on the clients before they're sent.

We're in the process of improving that implementation, and it should be ready soon!

mrinaldhar avatar Dec 15 '17 04:12 mrinaldhar

@mrinaldhar Great, thanks for your work! Would love to see that.

@geekgonecrazy I vote for disable uploads on active OTR, because uploads are not shown; one have to reload. May be combined with a warning, that uploads are disabled, when selecting the upload function, so that it's clear to users that uploads on OTR are not offered.

localguru avatar Dec 15 '17 06:12 localguru

Still not working in 0.61.0.

localguru avatar Jan 29 '18 16:01 localguru

The merge there is misleading. It was merged from a personal repo to a main project branch.

@mrinaldhar is there another PR we could link to this for people to track?

geekgonecrazy avatar Jan 30 '18 05:01 geekgonecrazy

Is there any fix for this yet? Any workaround?

ricardojrgpimentel avatar Mar 14 '18 20:03 ricardojrgpimentel

+1 same here, version 0.63.0

dbluxo avatar Apr 05 '18 13:04 dbluxo