Skip to content

Commit

Permalink
check validity of pagination number
Browse files Browse the repository at this point in the history
  • Loading branch information
MizukiTemma committed Sep 24, 2024
1 parent 098c88b commit 7753833
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion integreat_cms/cms/views/linkcheck/linkcheck_list_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def get_pagination_params(self) -> str:
:return: The URL params
"""
params = {
k: v for k, v in self.request.GET.items() if k in (self.page_kwarg, "size")
k: v
for k, v in self.request.GET.items()
if k in (self.page_kwarg, "size") and v in ["10", "20", "50", "100", "500"]
}
return f"?{urlencode(params)}" if params else ""

Expand Down

0 comments on commit 7753833

Please sign in to comment.