mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Merge branch 'bugfix/ascii-alphanumeric-names' into 'develop'
Add restriction on names Closes #15 See merge request !15
This commit is contained in:
commit
aef7e943e7
1 changed files with 1 additions and 0 deletions
|
@ -63,6 +63,7 @@ defmodule Pleroma.User do
|
||||||
|> validate_confirmation(:password)
|
|> validate_confirmation(:password)
|
||||||
|> unique_constraint(:email)
|
|> unique_constraint(:email)
|
||||||
|> unique_constraint(:nickname)
|
|> unique_constraint(:nickname)
|
||||||
|
|> validate_format(:nickname, ~r/^[a-zA-Z\d]+$/)
|
||||||
|
|
||||||
if changeset.valid? do
|
if changeset.valid? do
|
||||||
hashed = Comeonin.Pbkdf2.hashpwsalt(changeset.changes[:password])
|
hashed = Comeonin.Pbkdf2.hashpwsalt(changeset.changes[:password])
|
||||||
|
|
Loading…
Reference in a new issue