aboutsummaryrefslogtreecommitdiffstats
path: root/models/user_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-09-03 19:58:31 +0100
committerGitHub <noreply@github.com>2020-09-03 14:58:31 -0400
commit5c0697ad1ecbd25ff245a93ea5af55c07817249e (patch)
tree6b142324939f263e7e0b5eedf240c24d82480bec /models/user_test.go
parent8fa7a4b511e9318a50458488474ff4039a4f826a (diff)
downloadgitea-5c0697ad1ecbd25ff245a93ea5af55c07817249e.tar.gz
gitea-5c0697ad1ecbd25ff245a93ea5af55c07817249e.zip
Use argon as default password hash algorithm (#12688)
* Restrict TLS connections to 1.2 minimum * Set Argon2 as the default KDF * Fix user.yml * Remove TLS minversion changes Signed-off-by: Andrew Thornton <art27@cantab.net> * Add migration as per @techknowlogick Signed-off-by: Andrew Thornton <art27@cantab.net> * set the password algo in the fixtures Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove the v148 migration - it needs recreate table to change the defaults Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Nadim Kobeissi <nadim@symbolic.software>
Diffstat (limited to 'models/user_test.go')
-rw-r--r--models/user_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user_test.go b/models/user_test.go
index 02b1893c43..220823ee02 100644
--- a/models/user_test.go
+++ b/models/user_test.go
@@ -239,7 +239,7 @@ func TestHashPasswordDeterministic(t *testing.T) {
b := make([]byte, 16)
rand.Read(b)
u := &User{Salt: string(b)}
- algos := []string{"pbkdf2", "argon2", "scrypt", "bcrypt"}
+ algos := []string{"argon2", "pbkdf2", "scrypt", "bcrypt"}
for j := 0; j < len(algos); j++ {
u.PasswdHashAlgo = algos[j]
for i := 0; i < 50; i++ {