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

Enhancement: Add download restrictions for uploaded image files #2385

Closed
1 task done
ykare opened this issue Apr 11, 2024 · 1 comment · Fixed by #2389
Closed
1 task done

Enhancement: Add download restrictions for uploaded image files #2385

ykare opened this issue Apr 11, 2024 · 1 comment · Fixed by #2389
Labels
enhancement New feature or request

Comments

@ykare
Copy link

ykare commented Apr 11, 2024

What features would you like to see added?

Currently, image files uploaded to LibreChat can be downloaded by unauthenticated users through the /images endpoint.
I would like to request the following restrictions to be added:

  1. Only authenticated users should be able to download image files.
  2. Users should only be able to download image files that they have uploaded themselves.

I have already implemented and verified the restriction to allow only authenticated users to download images in my local environment.

More details

By imposing restrictions on downloading image files, I believe there will be the following benefits:

  • User privacy will be protected.
  • The spread of inappropriate images can be prevented.
  • Server load can be reduced.

Moreover, I consider this feature addition to be important for enhancing the security of LibreChat. Currently, even unauthenticated users can access image files, which poses a risk of misuse by malicious users.
By placing restrictions on downloading image files, such security risks can be mitigated.

Technically, I believe this would involve adding a process to verify the authentication status and the uploader of the requesting user when downloading image files.

Please consider this request. Thank you.

Which components are impacted by your request?

UI, Endpoints

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ykare ykare added the enhancement New feature or request label Apr 11, 2024
@danny-avila
Copy link
Owner

Note: several users wit intranet solutions that don't use HTTPS reported issues with images loading after locking them down. for this reason, I'm making lcoal image security via URL optional via config file: #2415

See docs: https://docs.librechat.ai/install/configuration/custom_config.html#config-structure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants