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: server to randomize image and logo filenames before generating presigned url #3927

Merged
merged 6 commits into from
May 31, 2022

Conversation

tshuli
Copy link
Contributor

@tshuli tshuli commented May 31, 2022

Problem

Fixes #128

Solution

  • Backend prefixes random string to image and logo filenames before returning presigned url, hence ensuring filename in bucket is unpredictable to client when /presign endpoint is first called
  • Backward compatibility is ensured by setting isNewClient flag for the frontend, which will be removed at a later date

Tests

  • Create storage mode form. Test that logo and image upload works and can be displayed in public form.
  • (safety check, should not be affected by this PR) Add attachment field. Test that file upload works and can be retrieved from storage mode
  • Repeat with old client
    (this can be done by rolling back to commit d979d0c1)

@tshuli tshuli merged commit 3d1d299 into develop May 31, 2022
@tshuli tshuli deleted the fix/presign branch May 31, 2022 06:57
@tshuli tshuli mentioned this pull request Jun 2, 2022
@tshuli tshuli mentioned this pull request Jul 18, 2022
2 tasks
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.

2 participants