suppress logging for resized image files which no longer exist
This commit is contained in:
@ -658,8 +658,15 @@ namespace Oqtane.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized File Access Attempt {FileId}", id);
|
if (file != null)
|
||||||
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized File Access Attempt {FileId}", id);
|
||||||
|
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HttpContext.Response.StatusCode = (int)HttpStatusCode.NotFound;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string errorPath = Path.Combine(GetFolderPath("wwwroot/images"), "error.png");
|
string errorPath = Path.Combine(GetFolderPath("wwwroot/images"), "error.png");
|
||||||
|
Reference in New Issue
Block a user