Skip to content

Commit c032006

Browse files
lunnyzeripath
andauthored
Turn default hash password algorightm back to pbkdf2 from argon2 until we found a better one (#14673) (#14675)
* Turn default hash password algorightm back to pbkdf2 from argon2 until we found a better one * Add a warning on document Co-authored-by: zeripath <[email protected]>
1 parent a1b74c5 commit c032006

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

custom/conf/app.example.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET = true
548548
;Classes include "lower,upper,digit,spec"
549549
PASSWORD_COMPLEXITY = off
550550
; Password Hash algorithm, either "argon2", "pbkdf2", "scrypt" or "bcrypt"
551-
PASSWORD_HASH_ALGO = argon2
551+
PASSWORD_HASH_ALGO = pbkdf2
552552
; Set false to allow JavaScript to read CSRF cookie
553553
CSRF_COOKIE_HTTP_ONLY = true
554554
; Validate against https://haveibeenpwned.com/Passwords to see if a password has been exposed

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ relation to port exhaustion.
402402
- `IMPORT_LOCAL_PATHS`: **false**: Set to `false` to prevent all users (including admin) from importing local path on server.
403403
- `INTERNAL_TOKEN`: **\<random at every install if no uri set\>**: Secret used to validate communication within Gitea binary.
404404
- `INTERNAL_TOKEN_URI`: **<empty>**: Instead of defining internal token in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`)
405-
- `PASSWORD_HASH_ALGO`: **argon2**: The hash algorithm to use \[argon2, pbkdf2, scrypt, bcrypt\].
405+
- `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, scrypt, bcrypt\], argon2 will spend more memory than others.
406406
- `CSRF_COOKIE_HTTP_ONLY`: **true**: Set false to allow JavaScript to read CSRF cookie.
407407
- `MIN_PASSWORD_LENGTH`: **6**: Minimum password length for new users.
408408
- `PASSWORD_COMPLEXITY`: **off**: Comma separated list of character classes required to pass minimum complexity. If left empty or no valid values are specified, checking is disabled (off):

modules/setting/setting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ func NewContext() {
771771
ImportLocalPaths = sec.Key("IMPORT_LOCAL_PATHS").MustBool(false)
772772
DisableGitHooks = sec.Key("DISABLE_GIT_HOOKS").MustBool(true)
773773
OnlyAllowPushIfGiteaEnvironmentSet = sec.Key("ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET").MustBool(true)
774-
PasswordHashAlgo = sec.Key("PASSWORD_HASH_ALGO").MustString("argon2")
774+
PasswordHashAlgo = sec.Key("PASSWORD_HASH_ALGO").MustString("pbkdf2")
775775
CSRFCookieHTTPOnly = sec.Key("CSRF_COOKIE_HTTP_ONLY").MustBool(true)
776776
PasswordCheckPwn = sec.Key("PASSWORD_CHECK_PWN").MustBool(false)
777777

0 commit comments

Comments
 (0)