aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorEpicCoder <EpicCoder@users.noreply.github.com>2019-07-07 08:01:01 +0200
committertechknowlogick <techknowlogick@gitea.io>2019-07-07 02:01:01 -0400
commit8d9d6aa903baf3662fa31bceb489291564a873d1 (patch)
tree7a952e1c0fce29af1de19df54fa570e24ff09fcc /modules
parent1b85b248e42a9d45d4dc278d399ddab3edcedfdb (diff)
downloadgitea-8d9d6aa903baf3662fa31bceb489291564a873d1.tar.gz
gitea-8d9d6aa903baf3662fa31bceb489291564a873d1.zip
Add additional password hash algorithms (closes #5859) (#6023)
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 43a61aa7fa..7201f0619d 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -154,6 +154,7 @@ var (
MinPasswordLength int
ImportLocalPaths bool
DisableGitHooks bool
+ PasswordHashAlgo string
// Database settings
UseSQLite3 bool
@@ -779,6 +780,7 @@ func NewContext() {
MinPasswordLength = sec.Key("MIN_PASSWORD_LENGTH").MustInt(6)
ImportLocalPaths = sec.Key("IMPORT_LOCAL_PATHS").MustBool(false)
DisableGitHooks = sec.Key("DISABLE_GIT_HOOKS").MustBool(false)
+ PasswordHashAlgo = sec.Key("PASSWORD_HASH_ALGO").MustString("pbkdf2")
InternalToken = loadInternalToken(sec)
IterateBufferSize = Cfg.Section("database").Key("ITERATE_BUFFER_SIZE").MustInt(50)
LogSQL = Cfg.Section("database").Key("LOG_SQL").MustBool(true)