Skip to content

Commit

Permalink
Merge pull request #4691 from zyhfish/task/fix-4690
Browse files Browse the repository at this point in the history
Fix #4690: prevent invalid parsing.
  • Loading branch information
sbwalker authored Oct 1, 2024
2 parents e78b11c + c458a77 commit 6a1dd38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Oqtane.Client/Modules/Controls/Pager.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 6a1dd38

Please sign in to comment.