diff options
author | lambadalambda <gitgud@rogerbraun.net> | 2017-04-24 09:59:44 -0400 |
---|---|---|
committer | lambadalambda <gitgud@rogerbraun.net> | 2017-04-24 09:59:44 -0400 |
commit | aef7e943e7a2a6924f3914142b53a6f862577c52 (patch) | |
tree | 3e0092e647800f423ce245ad64cea0fc35e73476 /lib | |
parent | a3b9741a627ab0ab0e2ec0dc13c1ed81283cc50a (diff) | |
parent | 668b01da0b9f339aabedaae424023e60a38c2529 (diff) | |
download | pleroma-aef7e943e7a2a6924f3914142b53a6f862577c52.tar.gz |
Merge branch 'bugfix/ascii-alphanumeric-names' into 'develop'
Add restriction on names
Closes #15
See merge request !15
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/user.ex | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 3ce07d510..5e579dc44 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -63,6 +63,7 @@ defmodule Pleroma.User do |> validate_confirmation(:password) |> unique_constraint(:email) |> unique_constraint(:nickname) + |> validate_format(:nickname, ~r/^[a-zA-Z\d]+$/) if changeset.valid? do hashed = Comeonin.Pbkdf2.hashpwsalt(changeset.changes[:password]) |