diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-07-27 15:13:34 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-07-27 15:13:34 -0500 |
commit | 6f44a0ee84a8dca7a94a38b45493a444390f13ec (patch) | |
tree | a031a623da5257fff10d6421fe9a514285ebf702 /lib | |
parent | 6747bf2e1642d7715a9f08469247bc99ff7165cb (diff) | |
download | pleroma-6f44a0ee84a8dca7a94a38b45493a444390f13ec.tar.gz |
Add configurable registration_reason limit
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/user.ex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index a78123fe4..913b6afd1 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -641,6 +641,7 @@ defmodule Pleroma.User do def register_changeset(struct, params \\ %{}, opts \\ []) do bio_limit = Config.get([:instance, :user_bio_length], 5000) name_limit = Config.get([:instance, :user_name_length], 100) + reason_limit = Config.get([:instance, :registration_reason_length], 500) params = Map.put_new(params, :accepts_chat_messages, true) need_confirmation? = @@ -681,6 +682,7 @@ defmodule Pleroma.User do |> validate_format(:email, @email_regex) |> validate_length(:bio, max: bio_limit) |> validate_length(:name, min: 1, max: name_limit) + |> validate_length(:registration_reason, max: reason_limit) |> maybe_validate_required_email(opts[:external]) |> put_password_hash |> put_ap_id() |