mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-24 02:52:37 +00:00
[SECURITY] default to pbkdf2 with 320,000 iterations
(cherry picked from commit3ea0b287d7) (cherry picked from commitdb8392a8ac) (cherry picked from commitbd2a5fa292) (cherry picked from commit2436acb3d9) (cherry picked from commit62f50e1c52) (cherry picked from commitdba1892521) (cherry picked from commit4b58e3b6d4) (cherry picked from commit1247056856) (cherry picked from commitafbaea7009) (cherry picked from commitdcd4813d96) (cherry picked from commitb51dc963d1) (cherry picked from commit611e895efd) (cherry picked from commitfd492a03f5) (cherry picked from commit2c99991f44) (cherry picked from commit7426c1edb4) (cherry picked from commit373244f8b2) (cherry picked from commite1038faee8) (cherry picked from commit5804aae16a) (cherry picked from commitc1d6665919) (cherry picked from commite41c2241ba)
This commit is contained in:
parent
7a7a293dbd
commit
b2ac8a37c7
3 changed files with 7 additions and 7 deletions
|
|
@ -28,11 +28,11 @@ func TestCheckSettingPasswordHashAlgorithm(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
t.Run("pbkdf2_v2 is the default when default password hash algorithm is empty", func(t *testing.T) {
|
||||
t.Run("pbkdf2_hi is the default when default password hash algorithm is empty", func(t *testing.T) {
|
||||
emptyConfig, emptyAlgo := SetDefaultPasswordHashAlgorithm("")
|
||||
pbkdf2v2Config, pbkdf2v2Algo := SetDefaultPasswordHashAlgorithm("pbkdf2_v2")
|
||||
pbkdf2hiConfig, pbkdf2hiAlgo := SetDefaultPasswordHashAlgorithm("pbkdf2_hi")
|
||||
|
||||
assert.Equal(t, pbkdf2v2Config, emptyConfig)
|
||||
assert.Equal(t, pbkdf2v2Algo.Specification, emptyAlgo.Specification)
|
||||
assert.Equal(t, pbkdf2hiConfig, emptyConfig)
|
||||
assert.Equal(t, pbkdf2hiAlgo.Specification, emptyAlgo.Specification)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue