From 73cb4f46ccb425e47237de5b00e4f4793d99b097 Mon Sep 17 00:00:00 2001 From: Luna D Date: Fri, 10 Sep 2021 19:34:21 +0200 Subject: [PATCH] reduce certain rate limits by half --- lib/philomena_web/controllers/image/comment_controller.ex | 2 +- lib/philomena_web/controllers/image_controller.ex | 2 +- lib/philomena_web/controllers/topic/post_controller.ex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/philomena_web/controllers/image/comment_controller.ex b/lib/philomena_web/controllers/image/comment_controller.ex index 5b3d6d38..3e75cc76 100644 --- a/lib/philomena_web/controllers/image/comment_controller.ex +++ b/lib/philomena_web/controllers/image/comment_controller.ex @@ -9,7 +9,7 @@ defmodule PhilomenaWeb.Image.CommentController do alias Philomena.Images plug PhilomenaWeb.LimitPlug, - [time: 30, error: "You may only create a comment once every 30 seconds."] + [time: 15, error: "You may only create a comment once every 15 seconds."] when action in [:create] plug PhilomenaWeb.FilterBannedUsersPlug when action in [:create, :edit, :update] diff --git a/lib/philomena_web/controllers/image_controller.ex b/lib/philomena_web/controllers/image_controller.ex index 87d96122..31f94104 100644 --- a/lib/philomena_web/controllers/image_controller.ex +++ b/lib/philomena_web/controllers/image_controller.ex @@ -20,7 +20,7 @@ defmodule PhilomenaWeb.ImageController do import Ecto.Query plug PhilomenaWeb.LimitPlug, - [time: 10, error: "You may only upload images once every 10 seconds."] + [time: 5, error: "You may only upload images once every 5 seconds."] when action in [:create] plug :load_image when action in [:show] diff --git a/lib/philomena_web/controllers/topic/post_controller.ex b/lib/philomena_web/controllers/topic/post_controller.ex index a847ba71..43478cbb 100644 --- a/lib/philomena_web/controllers/topic/post_controller.ex +++ b/lib/philomena_web/controllers/topic/post_controller.ex @@ -6,7 +6,7 @@ defmodule PhilomenaWeb.Topic.PostController do alias Philomena.UserStatistics plug PhilomenaWeb.LimitPlug, - [time: 30, error: "You may only make a post once every 30 seconds."] + [time: 15, error: "You may only make a post once every 15 seconds."] when action in [:create] plug PhilomenaWeb.FilterBannedUsersPlug