mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-11-10 19:09:12 +01:00
Pagination: Don't be dos'd by random parameters.
This commit is contained in:
parent
e1a547d7d3
commit
7a1cb752dd
@ -67,7 +67,7 @@ defmodule Pleroma.Web.ControllerHelper do
|
|||||||
defp build_pagination_fields(conn, min_id, max_id, extra_params) do
|
defp build_pagination_fields(conn, min_id, max_id, extra_params) do
|
||||||
params =
|
params =
|
||||||
conn.params
|
conn.params
|
||||||
|> Map.drop(Map.keys(conn.path_params) |> Enum.map(&String.to_atom/1))
|
|> Map.drop(Map.keys(conn.path_params) |> Enum.map(&String.to_existing_atom/1))
|
||||||
|> Map.merge(extra_params)
|
|> Map.merge(extra_params)
|
||||||
|> Map.drop(@id_keys)
|
|> Map.drop(@id_keys)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user