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

Module seems to break ~/error.vue functionality #185

Closed
tomsdob opened this issue Jul 25, 2023 · 3 comments
Closed

Module seems to break ~/error.vue functionality #185

tomsdob opened this issue Jul 25, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@tomsdob
Copy link

tomsdob commented Jul 25, 2023

Version

nuxt-security: ^0.14.2
nuxt: ^3.6.5

Reproduction Link

https://stackblitz.com/edit/github-nmhzwq-j1jkla

Steps to reproduce

Open the reproduction link, to see the custom error page working - comment out nuxt-security module from nuxt.config.ts.

What is Expected?

The custom ~/error.vue page is loaded.

What is actually happening?

When using nuxt-security module, the custom ~/error.vue page is not loaded.

Additional info

When trying to reproduce the issue in StackBlitz, the app does not load anything at all after adding nuxt-security module. Locally the app works, but the custom ~/error.vue page is shown only with 404 errors, for example error with statusCode 400 or 500 shows the default Nuxt error page with the following:

400
Bad Request

at createError (./node_modules/h3/dist/index.mjs:127:15)
at Object.handler (./.nuxt/dev/index.mjs:1258:17)
at Object.handler (./node_modules/h3/dist/index.mjs:1284:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async toNodeHandle (./node_modules/h3/dist/index.mjs:1359:7)
at async Object.ufetch [as localFetch] (./node_modules/unenv/runtime/fetch/index.mjs:9:17)
at async Object.errorhandler [as onError] (./.nuxt/dev/index.mjs:898:30)
at async Server.toNodeHandle (./node_modules/h3/dist/index.mjs:1366:9)
@tomsdob tomsdob added the bug Something isn't working label Jul 25, 2023
@Baroshem
Copy link
Owner

Hey,

Thanks for reporting this issue. Yes, there is a problem related to throwing errors and xssValidation. I am currently fixing it.

Baroshem added a commit that referenced this issue Jul 27, 2023
fix #185: errors in xss validation
@Baroshem
Copy link
Owner

I just released the 0.14.3 version that should fix your issue. I tried it both locally and on Stackblitz and is seems to be working right now. Please let me know if that helps :)

@tomsdob
Copy link
Author

tomsdob commented Jul 28, 2023

@Baroshem thanks, the issue has been fixed!

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