Merge pull request #6085 from sbwalker/dev

add some defensive logic in file handler
This commit is contained in:
Shaun Walker
2026-02-26 11:04:17 -05:00
committed by GitHub

View File

@@ -48,7 +48,7 @@ namespace Oqtane.Pages
public IActionResult OnGet(string path) public IActionResult OnGet(string path)
{ {
if (string.IsNullOrWhiteSpace(path)) if (string.IsNullOrWhiteSpace(path) || _alias == null)
{ {
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden; HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
return BrokenFile(); return BrokenFile();