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

Protect Uploads

Open brady-young opened this issue 10 years ago • 13 comments

Your Rocket.Chat version: 0.40.1

Hello, We are on the most current Rocket.Chat service version running on CentOS behind a reverse proxy server. We are having an access denied issue with file uploads. We have to have the protect uploads enabled for data privacy issues. We are getting the following errors:

"The image "https://server.com/file-upload/zfdsafesarefafee.jpg" cannot be display because it contains errors."

image

When i turn off Protect uploads both these errors go away and the file can be downloaded no problem. Any help is greatly appreciated.

brady-young avatar Sep 22 '16 17:09 brady-young

you need to login to your server in the browser once

engelgabriel avatar Sep 22 '16 18:09 engelgabriel

I have.... I get the same errors both in the browser and the client.

brady-young avatar Sep 22 '16 18:09 brady-young

with latest dev version i also get 403 when "Protect Uploads" is enabled Protect Uploads on disabled and everything is ok

Bitti09 avatar Oct 08 '16 18:10 Bitti09

Hello, I am just seeing if there is any update on this.

brady-young avatar Oct 17 '16 18:10 brady-young

Your Rocket.Chat version: 0.44 Default Browser: Chrome Protected Files Enabled LDAP Enabled I can confirm this is still an issue (at least in Chrome). Steps to reproduce are as follows:

  1. Upload file from within Desktop Client
  2. Attempt to download from within client will open a tab in Chrome. Page will load but will get a blank screen or access denied.
  3. Open chat server in Chrome window. Download file results in success.
  4. File can now be downloaded from the client once a download attempt has been made from Chrome browser.

luckofthelefty avatar Oct 28 '16 18:10 luckofthelefty

Found that it is definitely a bug. I have to constantly be logged into a web browser (doesn't matter what browser, Chrome, FF, IE, Opera, etc.) for the uploaded files to work. So there is an issue between the desktop rochet.chat client and opening and passing through authentication in the web browser. If users do not use the desktop client and only use the web browser as the client it all works. The only issue is when trying to click on the uploaded file link in the desktop client.

brady-young avatar Nov 01 '16 17:11 brady-young

Same issue noted on 0.44 Just upgraded to 0.45 but not yet tested.

reetp avatar Nov 01 '16 17:11 reetp

4.5 here; it is still an issue.

algonza avatar Nov 22 '16 22:11 algonza

Same issue on 0.48.

The client should be downloading files directly instead of opening them in a separate browser process.

jsumners avatar Jan 12 '17 14:01 jsumners

This has already been fixed. If anybody runs into the problem again, the issue can be reopened.

Hudell avatar Jun 06 '18 17:06 Hudell

Just faced same issue at fresh installation from helm rocketchat 6.4.1 OS version: Windows10 22H2 rocket.chat version: 3.9.9 default browser: chrome Protected Files: Enabled Keycloak: Enabled Basic auth: Disabled

100% repeateble at our installation (client need to login at browser before download files from rocket.chat client)

Clicking on cloud works fine. Clicking on file opens browser with 403 image

bub4z0r avatar Oct 06 '23 12:10 bub4z0r

Same here: Server: 6.3.9 LDAP: enabled Protected Files: Enabled

Client: Linux, Mac: 3.9.9

@Hudell maybe reopen the issue might be an idea

essal0815 avatar Oct 17 '23 11:10 essal0815

I'm having the same issue.