summaryrefslogtreecommitdiffstats
path: root/routers/api/v1
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2023-02-19 07:35:20 +0000
committerGitHub <noreply@github.com>2023-02-19 15:35:20 +0800
commit61b89747ed54e17ab5c7730adbad1c5d4d5ff78a (patch)
treef9523f365e1409f39fe2b7579474cdf194277c3b /routers/api/v1
parentd5e417a33d04d7a2d16317495d7aad45ca0868ed (diff)
downloadgitea-61b89747ed54e17ab5c7730adbad1c5d4d5ff78a.tar.gz
gitea-61b89747ed54e17ab5c7730adbad1c5d4d5ff78a.zip
Provide the ability to set password hash algorithm parameters (#22942)
This PR refactors and improves the password hashing code within gitea and makes it possible for server administrators to set the password hashing parameters In addition it takes the opportunity to adjust the settings for `pbkdf2` in order to make the hashing a little stronger. The majority of this work was inspired by PR #14751 and I would like to thank @boppy for their work on this. Thanks to @gusted for the suggestion to adjust the `pbkdf2` hashing parameters. Close #14751 --------- Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers/api/v1')
-rw-r--r--routers/api/v1/admin/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go
index 75d5520a0e..1fbdab3e55 100644
--- a/routers/api/v1/admin/user.go
+++ b/routers/api/v1/admin/user.go
@@ -15,9 +15,9 @@ import (
"code.gitea.io/gitea/models/auth"
"code.gitea.io/gitea/models/db"
user_model "code.gitea.io/gitea/models/user"
+ "code.gitea.io/gitea/modules/auth/password"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
- "code.gitea.io/gitea/modules/password"
"code.gitea.io/gitea/modules/setting"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/timeutil"