summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/account_controller_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-03-13 21:15:42 +0300
committerrinpatch <rinpatch@sdf.org>2020-03-13 21:41:17 +0300
commitfc4496d4fa45b0389f8476b2c2ee00d647a1dfbe (patch)
treec917ced57828d225ea898ebe26c1d4b0e8205826 /test/web/mastodon_api/controllers/account_controller_test.exs
parent00d17520314e3591caaa7ab4ca39c6227a6bdf15 (diff)
downloadpleroma-fc4496d4fa45b0389f8476b2c2ee00d647a1dfbe.tar.gz
pleroma-fc4496d4fa45b0389f8476b2c2ee00d647a1dfbe.zip
rate limiter: disable based on if remote ip was found, not on if the plug was enabled
The current rate limiter disable logic won't trigger when the remote ip is not forwarded, only when the remoteip plug is not enabled, which is not the case on most instances since it's enabled by default. This changes the behavior to warn and disable when the remote ip was not forwarded, even if the RemoteIP plug is enabled. Also closes #1620
Diffstat (limited to 'test/web/mastodon_api/controllers/account_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/account_controller_test.exs4
1 files changed, 0 insertions, 4 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs
index 7f7d8cea3..7efccd9c4 100644
--- a/test/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/web/mastodon_api/controllers/account_controller_test.exs
@@ -756,10 +756,6 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
end
describe "create account by app / rate limit" do
- clear_config([Pleroma.Plugs.RemoteIp, :enabled]) do
- Pleroma.Config.put([Pleroma.Plugs.RemoteIp, :enabled], true)
- end
-
clear_config([:rate_limit, :app_account_creation]) do
Pleroma.Config.put([:rate_limit, :app_account_creation], {10_000, 2})
end