Merge branch 'bcrypt-auth' into 'develop'
Handle bcrypt passwords for Mastodon migration See merge request pleroma/pleroma!2527
This commit is contained in:
commit
4157c459b8
7 changed files with 22 additions and 4 deletions
|
|
@ -79,6 +79,13 @@ defmodule Pleroma.Plugs.AuthenticationPlugTest do
|
|||
assert AuthenticationPlug.checkpw("password", hash)
|
||||
end
|
||||
|
||||
test "check bcrypt hash" do
|
||||
hash = "$2a$10$uyhC/R/zoE1ndwwCtMusK.TLVzkQ/Ugsbqp3uXI.CTTz0gBw.24jS"
|
||||
|
||||
assert AuthenticationPlug.checkpw("password", hash)
|
||||
refute AuthenticationPlug.checkpw("password1", hash)
|
||||
end
|
||||
|
||||
test "it returns false when hash invalid" do
|
||||
hash =
|
||||
"psBWV8gxkGOZWBz$PmfCycChoxeJ3GgGzwvhlgacb9mUoZ.KUXNCssekER4SJ7bOK53uXrHNb2e4i8yPFgSKyzaW9CcmrDXWIEMtD1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue