projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1a547d
)
Pagination: Don't be dos'd by random parameters.
author
lain
<lain@soykaf.club>
Tue, 12 Jan 2021 11:59:50 +0000
(12:59 +0100)
committer
lain
<lain@soykaf.club>
Tue, 12 Jan 2021 11:59:50 +0000
(12:59 +0100)
lib/pleroma/web/controller_helper.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/controller_helper.ex
b/lib/pleroma/web/controller_helper.ex
index 2df44309cd8ef9d7de9b6f9be57a185ca908bac7..0d112a932ae7db686f1cbbf1cb5282bd16e0b373 100644
(file)
--- 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)