logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 7a1cb752dd41856cfbfb2078353e5703a8ec375c
parent e1a547d7d3913974e1049c5dc60d46812c8abf3f
Author: lain <lain@soykaf.club>
Date:   Tue, 12 Jan 2021 12:59:50 +0100

Pagination: Don't be dos'd by random parameters.

Diffstat:

Mlib/pleroma/web/controller_helper.ex2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/pleroma/web/controller_helper.ex b/lib/pleroma/web/controller_helper.ex @@ -67,7 +67,7 @@ defmodule Pleroma.Web.ControllerHelper do defp build_pagination_fields(conn, min_id, max_id, extra_params) do 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.drop(@id_keys)