I have an asp.net mvc application with a route that allows users to request files that are stored outside the web application directory.
I will simplify the script, just tell you that it will ultimately limit them to a safe directory to which they have full access.
For example:
If the user (whose identifier is 100) requests:
http:
then my application will add "Cool.png" to "C: \ ImageRepository \ Users \ 100 \" and write these bytes to the response. The workflow has access to this path, but the anonymous user does not. I already have this job.
But some malicious user will be able to request something like:
http://mysite.com/Read/Image/..\101\Cool.png
and allow
"C:\ImageRepository\Customers\101\Cool.png"
(another user picture ?!)
- ? , , ?