From 144c33bcaba34ab1d6ecf1b492a4bace3e693f13 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Sat, 12 Dec 2020 15:58:58 -0500 Subject: [PATCH] make QueryString parameter keys case insensitive - resolves #992 --- Oqtane.Client/UI/SiteRouter.razor | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/UI/SiteRouter.razor b/Oqtane.Client/UI/SiteRouter.razor index 469a0a7b9..6b42f15bd 100644 --- a/Oqtane.Client/UI/SiteRouter.razor +++ b/Oqtane.Client/UI/SiteRouter.razor @@ -338,10 +338,13 @@ private Dictionary ParseQueryString(string query) { - Dictionary querystring = new Dictionary(); + Dictionary querystring = new Dictionary(StringComparer.OrdinalIgnoreCase); // case insensistive keys if (!string.IsNullOrEmpty(query)) { - query = query.Substring(1); // ignore "?" + if (query.StartsWith("?")) + { + query = query.Substring(1); // ignore "?" + } foreach (string kvp in query.Split(new[] { '&' }, StringSplitOptions.RemoveEmptyEntries)) { if (kvp != "")