GlobalRouter: Use PhysicalPath on allowed media.
This commit is contained in:
@@ -119,7 +119,7 @@ namespace VAR.Focus.Web
|
|||||||
string extension = Path.GetExtension(context.Request.FilePath).ToLower();
|
string extension = Path.GetExtension(context.Request.FilePath).ToLower();
|
||||||
if (Globals.AllowedExtensions.Contains(extension))
|
if (Globals.AllowedExtensions.Contains(extension))
|
||||||
{
|
{
|
||||||
string filePath = context.Server.MapPath(string.Format("~/{0}", context.Request.FilePath));
|
string filePath = context.Request.PhysicalPath;
|
||||||
if (File.Exists(filePath))
|
if (File.Exists(filePath))
|
||||||
{
|
{
|
||||||
StaticFileHelper.ResponseStaticFile(context, filePath);
|
StaticFileHelper.ResponseStaticFile(context, filePath);
|
||||||
|
|||||||
Reference in New Issue
Block a user