-
Notifications
You must be signed in to change notification settings - Fork 72
Inconsistent handling of multiple slashes in path #147
Comments
Is this actually caused by static files logic, or is it physical file provider? Embedded file provider will be different. |
@JunTaoLuo Could you investigate? |
Our checks for rooted paths in the physical file provider is preventing the request from being resolved. https://github.com/aspnet/FileSystem/blob/dev/src/Microsoft.Extensions.FileProviders.Physical/PhysicalFileProvider.cs#L201 |
@JunTaoLuo I think that's a good idea. Would that break anything that you can think of? |
I can't think of any breaks that would be caused by trimming multiple leading slashes. Any concerns @Tratcher? Security especially? |
Try it with the StaticFiles tests. Also try it on unix. |
Tests run fine and I've tested with the static files on core, full framework and core on osx. |
What about trying to escape out of the static file root? |
StaticFiles is inconsistent with handling of multiple slashes in a path. It appears to be allowed inside a path, but not at the start.
It should be either allowed or disallowed in all parts of the path.
The text was updated successfully, but these errors were encountered: