projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3b9741
)
Add restriction on names
author
dtluna
<dtluna@openmailbox.org>
Mon, 24 Apr 2017 12:33:27 +0000
(15:33 +0300)
committer
dtluna
<dtluna@openmailbox.org>
Mon, 24 Apr 2017 12:34:54 +0000
(15:34 +0300)
lib/pleroma/user.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index 3ce07d510b433eb1a699273dbe0f8990a4caaf0b..5e579dc446105a2f5b17d1b248e7c8963133d298 100644
(file)
--- 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])