-
Notifications
You must be signed in to change notification settings - Fork 56
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
xssValidator and Content-Type: multipart/form-data #364
Comments
Hey Buddy, I am glad that you like it! Let me answer your questions:
export default defineNuxtConfig({
routeRules: {
'/my-secret-route': {
security: {
xssValidator: false
}
}
}
}) |
Hi Baroshem, Thanks for you quick response!
|
Sorry xD didn't mean te close the ticket since the core issue is still here |
No worries, happened to me too many times ;) So regarding the contribution, if you are up for it feel free create a branch. work on your solution and create a PR with it. Then I could give you a review. If you don't feel comfortable designing the new solution by yourself, I can always give you some ideas in terms of how I would see it. Maybe it will help you :) |
Support for configuring methods for XSS validator was merged in 1.2.0 :) |
Hi,
In our project we send multipart/form-data to our nuxt server and it seems to interfere with the xssValidator.
If we send any binary in our body we get a BadRequest 400 response originating from the following location:
nuxt-security/src/runtime/server/middleware/xssValidator.ts
Line 35 in 11dc2d5
We think this is because multipart/form-data binary should not be stringified with JSON and then be compared to equality to the original binary input. Are we correct in this train of thought?
What can we do to fix our issue except from disabling the entire xssValidator?
A second question: why is the xssValidator only enabled on POST and GET? We'd expect it to be enabled on at least PATCH as well?
nuxt-security/src/runtime/server/middleware/xssValidator.ts
Line 11 in 11dc2d5
We'd love to hear from you, we really like your project!
The text was updated successfully, but these errors were encountered: