Skip to content

fix(auth): derive avatar extension from type - #194

Open
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/avatar-extension-from-type
Open

fix(auth): derive avatar extension from type#194
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/avatar-extension-from-type

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • derive stored avatar file extensions from the already-validated MIME type
  • avoid trusting the original uploaded filename extension for storage paths
  • add a regression test for a PNG upload submitted with a misleading .php filename

Test

  • node node_modules\vitest\vitest.mjs run --config %TEMP%\qryptchat-vitest-minimal.config.mjs "src/app/api/auth/upload-avatar/route.test.js"
  • git diff --check

uGig billing

  • Expected invoice: 0.50 USD if accepted/merged
  • Counted as revenue now: no, pending review/payment

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.

1 participant