discourse/plugins/chat/app
Alan Guo Xiang Tan bfc3132bb2
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:53:46 +01:00
..
controllers/chat SECURITY: Impose a upper bound on limit params in various controllers 2023-07-28 12:53:46 +01:00
helpers/chat FEATURE: Mark all chat channels read with a shortcut (#20629) 2023-03-22 13:24:07 +10:00
jobs DEV: moves logic from job to a service (#22691) 2023-07-27 10:25:41 +02:00
models DEV: Refactor chat channel fetching 2023-07-27 11:55:17 +02:00
policies DEV: Refactor DM channel creation into new service pattern (#22144) 2023-07-03 10:18:37 +10:00
queries/chat FEATURE: thread pagination (#22624) 2023-07-27 09:57:03 +02:00
serializers/chat FEATURE: thread pagination (#22624) 2023-07-27 09:57:03 +02:00
services DEV: moves logic from job to a service (#22691) 2023-07-27 10:25:41 +02:00
validators/chat DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
views