Merge branch 'remove-crypt' into 'develop'
Remove crypt(3) support Closes #3030 and #3062 See merge request pleroma/pleroma!3847
This commit is contained in:
parent
937df7e465
commit
40f14fd31c
5 changed files with 1 additions and 40 deletions
|
|
@ -38,10 +38,6 @@ defmodule Pleroma.Web.Plugs.AuthenticationPlug do
|
|||
|
||||
def call(conn, _), do: conn
|
||||
|
||||
def checkpw(password, "$6" <> _ = password_hash) do
|
||||
:crypt.crypt(password, password_hash) == password_hash
|
||||
end
|
||||
|
||||
def checkpw(password, "$2" <> _ = password_hash) do
|
||||
# Handle bcrypt passwords for Mastodon migration
|
||||
Bcrypt.verify_pass(password, password_hash)
|
||||
|
|
@ -60,10 +56,6 @@ defmodule Pleroma.Web.Plugs.AuthenticationPlug do
|
|||
do_update_password(user, password)
|
||||
end
|
||||
|
||||
def maybe_update_password(%User{password_hash: "$6" <> _} = user, password) do
|
||||
do_update_password(user, password)
|
||||
end
|
||||
|
||||
def maybe_update_password(user, _), do: {:ok, user}
|
||||
|
||||
defp do_update_password(user, password) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue