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

Web: Fixed the download and preview file not authorized. #3652

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

baifachuan
Copy link
Contributor

@baifachuan baifachuan commented Nov 26, 2024

#3651

What problem does this PR solve?

Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@baifachuan
Copy link
Contributor Author

image

download file or preview use the '/get/<file_id>' API, but the API is not authorized.

so you can call the api to download file with anonymous user.

This is a very big security risk.

download or preview file must be login user, not anonymous user.

@baifachuan
Copy link
Contributor Author

baifachuan commented Nov 26, 2024

But I have another question, why only link to KB file can download or preview?

If the file not link to KB, you can get this error:

image

Why?

@yuzhichang yuzhichang force-pushed the fixed-download-preview-not-auth branch from d6e4413 to ae51ed6 Compare November 26, 2024 08:23
@baifachuan baifachuan changed the title Web: Fixed the download and preview file not auth. Web: Fixed the download and preview file not authorized. Nov 26, 2024
@JinHai-CN JinHai-CN added the ci Continue Integration label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continue Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants