Skip to content

Commit f745262

Browse files
Small tweaks
1 parent 6fd0df6 commit f745262

3 files changed

Lines changed: 2 additions & 7 deletions

File tree

src/main/java/fr/xephi/authme/message/MessageKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public enum MessageKey {
8080
/** The chosen password isn't safe, please choose another one... */
8181
PASSWORD_UNSAFE_ERROR("password.unsafe_password"),
8282

83-
/** Your chosen password has been used %pwned_count times worldwide! Please use a strong password... */
83+
/** Your chosen password is not secure. It was used %pwned_count times already! Please use a stronger password... */
8484
PASSWORD_PWNED_ERROR("password.pwned_password", "%pwned_count"),
8585

8686
/** Your password contains illegal characters. Allowed chars: %valid_chars */

src/main/java/fr/xephi/authme/service/ValidationService.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ public HaveIBeenPwnedResults validatePasswordHaveIBeenPwned(String password) {
254254
connection.setRequestProperty("User-Agent", "AuthMeReloaded");
255255
connection.setConnectTimeout(5000);
256256
connection.setReadTimeout(5000);
257-
connection.setDoOutput(true);
258257
connection.setDoInput(true);
259258
StringBuilder outStr = new StringBuilder();
260259

@@ -264,13 +263,9 @@ public HaveIBeenPwnedResults validatePasswordHaveIBeenPwned(String password) {
264263
}
265264

266265
String[] hashes = outStr.toString().split("\n");
267-
System.out.println(Arrays.toString(hashes));
268266
for (String hashSuffix : hashes) {
269267
String[] hashSuffixParts = hashSuffix.trim().split(":");
270-
System.out.println(Arrays.toString(hashSuffixParts));
271268
if (hashSuffixParts[0].equalsIgnoreCase(hash.substring(5))) {
272-
System.out.println("Found match");
273-
System.out.println(hashSuffixParts[1]);
274269
return new HaveIBeenPwnedResults(true, Integer.parseInt(hashSuffixParts[1]));
275270
}
276271
}

src/main/resources/messages/messages_en.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ password:
1818
match_error: '&cPasswords didn''t match, check them again!'
1919
name_in_password: '&cYou can''t use your name as password, please choose another one...'
2020
unsafe_password: '&cThe chosen password isn''t safe, please choose another one...'
21-
pwned_password: '&cYour chosen password is not secure. It was used %pwned_count times already! Please use a strong password...'
21+
pwned_password: '&cYour chosen password is not secure. It was used %pwned_count times already! Please use a stronger password...'
2222
forbidden_characters: '&4Your password contains illegal characters. Allowed chars: %valid_chars'
2323
wrong_length: '&cYour password is too short or too long! Please try with another one!'
2424

0 commit comments

Comments
 (0)