From c458a77d27b11402d8acbcd533269ca82b4aa6f7 Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 1 Oct 2024 22:13:32 +0800 Subject: [PATCH] Fix #4690: prevent invalid parsing. --- Oqtane.Client/Modules/Controls/Pager.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Modules/Controls/Pager.razor b/Oqtane.Client/Modules/Controls/Pager.razor index ce14eed6d..ab1db7403 100644 --- a/Oqtane.Client/Modules/Controls/Pager.razor +++ b/Oqtane.Client/Modules/Controls/Pager.razor @@ -452,9 +452,9 @@ _displayPages = int.Parse(DisplayPages); } - if (PageState.QueryString.ContainsKey("page")) + if (PageState.QueryString.ContainsKey("page") && int.TryParse(PageState.QueryString["page"], out int page)) { - _page = int.Parse(PageState.QueryString["page"]); + _page = page; } else {