1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-17 18:49:15 +00:00

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 @@
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, :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 @@ test "returns an ap_followers link for a user" 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