From 99949bdeb95d5c3887c99a8beacd2cdc7b1c5d16 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Mon, 30 Mar 2026 08:48:33 -0400 Subject: [PATCH] fix #6154 - handle invalid urls --- Oqtane.Shared/Models/Route.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Oqtane.Shared/Models/Route.cs b/Oqtane.Shared/Models/Route.cs index 87577c02..a827e85d 100644 --- a/Oqtane.Shared/Models/Route.cs +++ b/Oqtane.Shared/Models/Route.cs @@ -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);