Merge remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue

This commit is contained in:
Ivan Tashkinov 2019-08-22 21:01:28 +03:00
commit 7101ba1a21
6 changed files with 15 additions and 2 deletions

View File

@ -573,7 +573,8 @@ config :pleroma, :rate_limit,
statuses_actions: {10_000, 15},
status_id_action: {60_000, 3},
password_reset: {1_800_000, 5},
account_confirmation_resend: {8_640_000, 5}
account_confirmation_resend: {8_640_000, 5},
ap_routes: {60_000, 15}
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.

View File

@ -75,7 +75,8 @@ config :pleroma, Pleroma.ScheduledActivity,
config :pleroma, :rate_limit,
search: [{1000, 30}, {1000, 30}],
app_account_creation: {10_000, 5},
password_reset: {1000, 30}
password_reset: {1000, 30},
ap_routes: nil
config :pleroma, :http_security, report_uri: "https://endpoint.com"

View File

@ -22,6 +22,11 @@ defmodule Pleroma.Web.OStatus.OStatusController do
alias Pleroma.Web.Router
alias Pleroma.Web.XML
plug(
Pleroma.Plugs.RateLimiter,
{:ap_routes, params: ["uuid"]} when action in [:object, :activity]
)
plug(Pleroma.Web.FederatingPlug when action in [:salmon_incoming])
plug(

View File

@ -543,6 +543,9 @@ defmodule Pleroma.UserTest do
avatar: %{some: "avatar"}
}
clear_config([:instance, :user_bio_length])
clear_config([:instance, :user_name_length])
test "it confirms validity" do
cs = User.remote_user_creation(@valid_remote)
assert cs.valid?

View File

@ -25,6 +25,8 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
:ok
end
clear_config([:instance, :max_remote_account_fields])
describe "handle_incoming" do
test "it ignores an incoming notice if we already have it" do
activity = insert(:note_activity)

View File

@ -9,6 +9,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
use Pleroma.Web.ConnCase
import Pleroma.Factory
clear_config([:instance, :max_account_fields])
describe "updating credentials" do
test "sets user settings in a generic way", %{conn: conn} do