Merge pull request #6155 from sbwalker/dev
fix #6154 - handle invalid urls
This commit is contained in:
@@ -66,9 +66,12 @@ namespace Oqtane.Models
|
||||
Action = ModuleId.Substring(pos + 1);
|
||||
Action = (!string.IsNullOrEmpty(Action)) ? Action : Constants.DefaultAction;
|
||||
ModuleId = ModuleId.Substring(0, pos);
|
||||
ModuleId = (int.TryParse(ModuleId, out _)) ? ModuleId : "-1";
|
||||
}
|
||||
}
|
||||
if (!int.TryParse(ModuleId, out _))
|
||||
{
|
||||
ModuleId = "-1";
|
||||
}
|
||||
if (PagePath.StartsWith("/"))
|
||||
{
|
||||
PagePath = (PagePath.Length == 1) ? "" : PagePath.Substring(1);
|
||||
|
||||
Reference in New Issue
Block a user