Support plain text password storage method (NOCRYPT)

This commit is contained in:
HaHaWTH 2024-05-27 05:11:15 +08:00
parent c0b6d87678
commit 6dea065ed2
3 changed files with 17 additions and 1 deletions

View File

@ -32,6 +32,7 @@ public enum HashAlgorithm {
WORDPRESS(fr.xephi.authme.security.crypts.Wordpress.class),
XAUTH(fr.xephi.authme.security.crypts.XAuth.class),
XFBCRYPT(fr.xephi.authme.security.crypts.XfBCrypt.class),
NOCRYPT(fr.xephi.authme.security.crypts.NoCrypt.class),
CUSTOM(null),
@Deprecated DOUBLEMD5(fr.xephi.authme.security.crypts.DoubleMd5.class),

View File

@ -0,0 +1,15 @@
package fr.xephi.authme.security.crypts;
import fr.xephi.authme.security.crypts.description.Recommendation;
import fr.xephi.authme.security.crypts.description.Usage;
@Deprecated
@Recommendation(Usage.DEPRECATED)
public class NoCrypt extends UnsaltedMethod {
@Override
public String computeHash(String password) {
return password;
}
}

View File

@ -127,7 +127,7 @@ public final class SecuritySettings implements SettingsHolder {
@Comment({
"Possible values: SHA256, BCRYPT, BCRYPT2Y, PBKDF2, SALTEDSHA512,",
"MYBB, IPB3, PHPBB, PHPFUSION, SMF, XENFORO, XAUTH, JOOMLA, WBB3, WBB4, MD5VB,",
"PBKDF2DJANGO, WORDPRESS, ROYALAUTH, ARGON2, CUSTOM (for developers only). See full list at",
"PBKDF2DJANGO, WORDPRESS, ROYALAUTH, ARGON2, NOCRYPT, CUSTOM (for developers only). See full list at",
"https://github.com/AuthMe/AuthMeReloaded/blob/master/docs/hash_algorithms.md",
"If you use ARGON2, check that you have the argon2 c library on your system"
})