discourse/plugins
Alan Guo Xiang Tan 439cc5b023
SECURITY: Impose a upper bound on limit params in various controllers
What is the problem here?

In multiple controllers, we are accepting a `limit` params but do not
impose any upper bound on the values being accepted. Without an upper
bound, we may be allowing arbituary users from generating DB queries
which may end up exhausing the resources on the server.

What is the fix here?

A new `fetch_limit_from_params` helper method is introduced in
`ApplicationController` that can be used by controller actions to safely
get the limit from the params as a default limit and maximum limit has
to be set. When an invalid limit params is encountered, the server will
respond with the 400 response code.
2023-07-28 12:56:35 +01:00
..
chat SECURITY: Impose a upper bound on limit params in various controllers 2023-07-28 12:56:35 +01:00
discourse-details Update translations (#22301) 2023-06-27 16:39:51 +02:00
discourse-local-dates Update translations (#22301) 2023-06-27 16:39:51 +02:00
discourse-narrative-bot Update translations (#22665) 2023-07-25 17:57:53 +02:00
discourse-presence Update translations (#20390) 2023-02-21 17:10:42 +01:00
lazy-yt DEV: Apply syntax_tree formatting to plugins/* 2023-01-07 11:11:37 +00:00
poll Update translations (#22665) 2023-07-25 17:57:53 +02:00
styleguide Update translations (#22665) 2023-07-25 17:57:53 +02:00