-
Notifications
You must be signed in to change notification settings - Fork 284
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
Task terminated with unhandled exception: Invalid path entry #1630
Comments
More info: @s-ludwig any chance of a quick fix? anything will work, but killing the event loop with an assert makes this an easy DoS channel |
I'll have a look at this. It's probably okay (necessary anyway) to relax the rules a bit. The new However, in this case the right thing to do would be to parse this as a Windows path, whereas it will currently be parsed as a system native path. So to maybe find a higher level solution, do you know where the path originates from? A form upload? vibe-core defines and uses a new In addition to converting the assertion to an exception, the form upload code could then also attempt to sanitize the file name, of course. |
Hello, hopefully this helps: I just observed this on one of my vibe.d-based servers:
This seems to be related to an Apache Struts2 exploit: rapid7/metasploit-framework#8064 |
This commit turns the assert into an Exception which can then be handled by user code. Additionally, tasks that aren't Feel free to comment / re-open if I missed anything. |
Task terminated with unhandled exception: Invalid path entry: H:\Own files\Eigene Dokumente\Travel\160704_Ihla.docx
We get these sometimes. It seems like some browser or someone malicious is passing some oddly formatted string as the file name, which vibe fails to parse. This is an assert in the PathEntry ctor.
It happens while parsing the request, before any of my code runs.
Unfortunately, I have no idea what the full path passed is nor do I have a callstack, but I assume it's being called from splitPath()
I think sanitation should happen before hand, and errors should be gracefully dealt with in this case. I could then handle bad paths on my application code, but as it is, I have no chance of doing so.
The text was updated successfully, but these errors were encountered: