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

createSignedUploadUrl does not validate mime type. #1248

Open
2 tasks done
saqibameen opened this issue Jul 18, 2024 · 1 comment
Open
2 tasks done

createSignedUploadUrl does not validate mime type. #1248

saqibameen opened this issue Jul 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@saqibameen
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

If I create a signed upload url using createSignedUploadUrl and upload a file with a different mime type, it does not stop.

E.g.,
1- create signedUploadUrl for file.md
2- upload test.pdf buffer with Content-Type: application/pdf in headers
✅ Successfully uploaded

1- create signedUploadUrl for file.md
2- upload test.pdf buffer with Content-Type: text/markdown in headers
✅ Successfully uploaded

To Reproduce

Do following on the above two test cases:

  1. create SignedUploadUrl
  2. Upload file

Expected behavior

It should give error that mime type does not match.

Screenshots

NA

System information

  • OS: macOS
  • Version of supabase-js: 2.44.4
  • Version of Node.js: NA (using cloudflare worker)
@anonymousRecords
Copy link

I made a PR for this issue : supabase/storage-js#210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants