diff options
author | John Olheiser <john.olheiser@gmail.com> | 2020-09-08 17:06:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 17:06:39 -0500 |
commit | c6e4bc53aad371210f0cb670e36c57132087b230 (patch) | |
tree | ef2eecef855a4257a22eb61aefd5439be23a770e /modules/setting/setting.go | |
parent | bea343ce0997262e61c5d83812a270090896afbf (diff) | |
download | gitea-c6e4bc53aad371210f0cb670e36c57132087b230.tar.gz gitea-c6e4bc53aad371210f0cb670e36c57132087b230.zip |
Check passwords against HaveIBeenPwned (#12716)
* Implement pwn
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update module
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Apply suggestions mrsdizzie
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
* Add link to HIBP
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add more details to admin command
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add context to pwn
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Consistency and making some noise ;)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index c93cc92804..7d7eacba6f 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -146,6 +146,7 @@ var ( OnlyAllowPushIfGiteaEnvironmentSet bool PasswordComplexity []string PasswordHashAlgo string + PasswordCheckPwn bool // UI settings UI = struct { @@ -744,6 +745,7 @@ func NewContext() { OnlyAllowPushIfGiteaEnvironmentSet = sec.Key("ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET").MustBool(true) PasswordHashAlgo = sec.Key("PASSWORD_HASH_ALGO").MustString("argon2") CSRFCookieHTTPOnly = sec.Key("CSRF_COOKIE_HTTP_ONLY").MustBool(true) + PasswordCheckPwn = sec.Key("PASSWORD_CHECK_PWN").MustBool(false) InternalToken = loadInternalToken(sec) |