mirror of
https://github.com/moparisthebest/xAuth
synced 2024-11-10 11:25:02 -05:00
1. Increased salt length to 12
2. Fixed target-related message replacement 3. Added two new message replacement variables
This commit is contained in:
parent
e2983c79da
commit
341623d5e1
@ -152,7 +152,7 @@ public class Util {
|
||||
w.NESSIEinit();
|
||||
w.NESSIEadd(UUID.randomUUID().toString());
|
||||
w.NESSIEfinalize(digest);
|
||||
String salt = Whirlpool.display(digest).substring(0, 8);
|
||||
String salt = Whirlpool.display(digest).substring(0, 12);
|
||||
|
||||
w.NESSIEinit();
|
||||
w.NESSIEadd(salt + pass);
|
||||
|
@ -242,7 +242,7 @@ public class xAuth extends JavaPlugin {
|
||||
int saltPos = (checkPass.length() >= realPass.length() ? realPass.length() : checkPass.length());
|
||||
|
||||
// extract salt
|
||||
String salt = realPass.substring(saltPos, saltPos + 8);
|
||||
String salt = realPass.substring(saltPos, saltPos + 12);
|
||||
|
||||
// encrypt salt + checkPass
|
||||
Whirlpool w = new Whirlpool();
|
||||
|
@ -236,12 +236,14 @@ public class xAuthMessages {
|
||||
|
||||
// target
|
||||
if (target != null) {
|
||||
message = message.replace("{TARGET}", player.getName());
|
||||
message = message.replace("{TARGETIP}", Util.getHostFromPlayer(player));
|
||||
message = message.replace("{TARGET}", target.getName());
|
||||
message = message.replace("{TARGETIP}", Util.getHostFromPlayer(target));
|
||||
}
|
||||
|
||||
// settings
|
||||
message = message.replace("{PWMINLENGTH}", Integer.toString(xAuthSettings.pwMinLength));
|
||||
message = message.replace("{NAMEMINLENGTH}", Integer.toString(xAuthSettings.filterMinLength));
|
||||
message = message.replace("{MAXSTRIKES}", Integer.toString(xAuthSettings.maxStrikes));
|
||||
|
||||
// misc
|
||||
message = message.replace("{NEWLINE}", "\n");
|
||||
|
Loading…
Reference in New Issue
Block a user