fix: validate unsupported fileExt mime types#3879
Conversation
✅ Deploy Preview for fakerjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #3879 +/- ##
=======================================
Coverage 98.92% 98.92%
=======================================
Files 908 908
Lines 3159 3162 +3
Branches 581 582 +1
=======================================
+ Hits 3125 3128 +3
Misses 30 30
Partials 4 4
🚀 New features to boost your workflow:
|
|
What was the old behavior? |
|
is including user input in error messages a potential XSS vector? like what if someone passes
and then a website naively renders the error message in HTML causing the payload to execute. |
|
IMO not. Adding arbritary text as html is the issue. Not some code throwing an error message containing something that looks like a script. |
|
Can this affect the API docs by any chance? We are inserting the return values of our functions as HTML into the DOM. faker/docs/.vitepress/components/api-docs/refreshable-code.vue Lines 101 to 107 in 5458620 |
|
faker/scripts/shared/refreshable-code.ts Line 31 in 5458620 We add the error type not the error message. In addition to that we check our examples for malicious code anyway. |
I wasn't aware of it. That's why I was asking. Thanks for pointing that out.
I guess you refer to manual checks? Or in the refreshable code component? If the first thing is true, a malicious example might still be provided as a PR and automatically deployed to netlify. Sure, that is not the main Faker webpage, but still a page running under the faker domain. |
Yes
The same is true for all PRs. A PR can disable or remove any security check we have. If that is a concern for you, maybe enable copilot reviews for all PRs. |


Summary
Validation