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

Fix URL safe string decoding for DownloadPublicObject API #3328

Merged
merged 1 commit into from
May 3, 2024

Conversation

cesnietor
Copy link
Collaborator

@cesnietor cesnietor commented May 3, 2024

fixes: #3327

Similar to #3305 it uses url safe base64 decoding for the download of the object. Used in Share File functionality. The previous PR fixed the creation of the URL (encoding), this fixes the decoding of it.

Includes unittest.

Test steps:

With an existing bucket, folder and objects.

  • With different filenames e,.g. with .jpg, .svg, .png, spaces, etc
  • Click share file
  • Copy and paste the new url in the browser
  • The url should contain same url as Object browser
  • Object should be downloaded
  • Test injecting wrong urls (base64encoded)
  • Should return error or forbidden errors if url doesn't point to internal MinIO server

@cesnietor cesnietor self-assigned this May 3, 2024
@cesnietor cesnietor marked this pull request as ready for review May 3, 2024 20:35
Copy link
Contributor

@bayasdev bayasdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cesnietor cesnietor requested a review from reivaj05 May 3, 2024 20:36
@cesnietor cesnietor merged commit cbeef2b into minio:master May 3, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"illegal base64 data at input byte" when using certain share URLs generated via Console 1.3.0
4 participants