add some defensive logic in file handler

This commit is contained in:
sbwalker
2026-02-26 11:03:58 -05:00
parent c3a0a96623
commit 18730c5e53

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();