Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7e3aaf61ef | |||
| 69ea9a1d43 | |||
| 1dfbbb543c | |||
| 092df678a8 | |||
| 5f165eed75 | |||
| a988422302 | |||
| e5f6e31af2 | |||
| f4bd83e86a | |||
| 7713ee499d | |||
| 6fb2d93650 | |||
| 81db29f76f | |||
| fd2018186c | |||
| bb85a7c619 | |||
| 9e7e90db6c | |||
| 007e01156b | |||
| d2ec62ac7f | |||
| da32bdec94 | |||
| 7d58e90557 | |||
| 08dabda7c7 | |||
| feea348ec3 | |||
| 67eb7dee0f | |||
| 6fb1d2855e | |||
| faa3d9320c | |||
| 497cd543fd | |||
| 71d5205df0 | |||
| bba90d93f1 | |||
| ab40b1b82d | |||
| 22a6cefbdc | |||
| 9ca3a24862 | |||
| 91f0dfa5c5 | |||
| f0e935a5d8 | |||
| f0fae0fce0 | |||
| 4c40ba36a6 | |||
| bd7a25560f |
@@ -111,7 +111,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>3.8.0</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<failOnError>false</failOnError>
|
<failOnError>false</failOnError>
|
||||||
<failOnWarnings>false</failOnWarnings>
|
<failOnWarnings>false</failOnWarnings>
|
||||||
@@ -497,13 +497,13 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-install-plugin</artifactId>
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
<version>3.1.2</version>
|
<version>3.1.3</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Deploy the jars as artifacts into the remote repository -->
|
<!-- Deploy the jars as artifacts into the remote repository -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
<version>3.1.2</version>
|
<version>3.1.3</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Handle documentation generation, required by other plugins -->
|
<!-- Handle documentation generation, required by other plugins -->
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -784,7 +784,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mysql</groupId>
|
<groupId>com.mysql</groupId>
|
||||||
<artifactId>mysql-connector-j</artifactId>
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
<version>8.0.33</version>
|
<version>9.1.0</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -901,14 +901,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-platform-bukkit</artifactId>
|
<artifactId>adventure-platform-bukkit</artifactId>
|
||||||
<version>4.3.3</version>
|
<version>4.3.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-text-serializer-gson</artifactId>
|
<artifactId>adventure-text-serializer-gson</artifactId>
|
||||||
<version>4.17.0</version>
|
<version>4.17.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- LuckPerms plugin -->
|
<!-- LuckPerms plugin -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.luckperms</groupId>
|
<groupId>net.luckperms</groupId>
|
||||||
@@ -1142,7 +1142,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.checkerframework</groupId>
|
<groupId>org.checkerframework</groupId>
|
||||||
<artifactId>checker-qual</artifactId>
|
<artifactId>checker-qual</artifactId>
|
||||||
<version>3.45.0</version>
|
<version>3.48.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -1158,7 +1158,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.xerial</groupId>
|
<groupId>org.xerial</groupId>
|
||||||
<artifactId>sqlite-jdbc</artifactId>
|
<artifactId>sqlite-jdbc</artifactId>
|
||||||
<version>3.46.0.0</version>
|
<version>3.46.1.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class AuthMe extends JavaPlugin {
|
|||||||
// Version and build number values
|
// Version and build number values
|
||||||
private static String pluginVersion = "5.7.0-Fork";
|
private static String pluginVersion = "5.7.0-Fork";
|
||||||
private static final String pluginBuild = "b";
|
private static final String pluginBuild = "b";
|
||||||
private static String pluginBuildNumber = "52";
|
private static String pluginBuildNumber = "53";
|
||||||
// Private instances
|
// Private instances
|
||||||
private EmailService emailService;
|
private EmailService emailService;
|
||||||
private CommandHandler commandHandler;
|
private CommandHandler commandHandler;
|
||||||
|
|||||||
+9
-5
@@ -8,6 +8,7 @@ import fr.xephi.authme.process.Management;
|
|||||||
import fr.xephi.authme.service.CommonService;
|
import fr.xephi.authme.service.CommonService;
|
||||||
import fr.xephi.authme.service.ValidationService;
|
import fr.xephi.authme.service.ValidationService;
|
||||||
import fr.xephi.authme.service.ValidationService.ValidationResult;
|
import fr.xephi.authme.service.ValidationService.ValidationResult;
|
||||||
|
import fr.xephi.authme.settings.properties.SecuritySettings;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@@ -42,11 +43,14 @@ public class ChangePasswordCommand extends PlayerCommand {
|
|||||||
commonService.send(player, MessageKey.NOT_LOGGED_IN);
|
commonService.send(player, MessageKey.NOT_LOGGED_IN);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Check if the user has been verified or not
|
|
||||||
if (codeManager.isVerificationRequired(player)) {
|
if (commonService.getProperty(SecuritySettings.CHANGE_PASSWORD_EMAIL_VERIFICATION_REQUIRED)) {
|
||||||
codeManager.codeExistOrGenerateNew(name);
|
// Check if the user has been verified or not
|
||||||
commonService.send(player, MessageKey.VERIFICATION_CODE_REQUIRED);
|
if (codeManager.isVerificationRequired(player)) {
|
||||||
return;
|
codeManager.codeExistOrGenerateNew(name);
|
||||||
|
commonService.send(player, MessageKey.VERIFICATION_CODE_REQUIRED);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String oldPassword = arguments.get(0);
|
String oldPassword = arguments.get(0);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class ProcessSyncPlayerQuit implements SynchronousProcess {
|
|||||||
} else {
|
} else {
|
||||||
limboService.restoreData(player);
|
limboService.restoreData(player);
|
||||||
if (!UniversalScheduler.isFolia) { // AuthMeReReloaded - Fix #146 (Very stupid solution, but works)
|
if (!UniversalScheduler.isFolia) { // AuthMeReReloaded - Fix #146 (Very stupid solution, but works)
|
||||||
player.saveData(); // #1238: Speed is sometimes not restored properly
|
// player.saveData(); // #1238: Speed is sometimes not restored properly
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.leaveVehicle();
|
player.leaveVehicle();
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
public class AuthMeExpansion extends PlaceholderExpansion {
|
public class AuthMeExpansion extends PlaceholderExpansion {
|
||||||
private final Settings settings = AuthMe.settings;
|
private final Settings settings = AuthMe.settings;
|
||||||
private final AuthMeApi authMeApi = AuthMeApi.getInstance();
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull String getIdentifier() {
|
public @NotNull String getIdentifier() {
|
||||||
return "authme";
|
return "authme";
|
||||||
@@ -39,6 +38,8 @@ public class AuthMeExpansion extends PlaceholderExpansion {
|
|||||||
@Override
|
@Override
|
||||||
public String onRequest(OfflinePlayer player, @NotNull String params) {
|
public String onRequest(OfflinePlayer player, @NotNull String params) {
|
||||||
if (!settings.getProperty(HooksSettings.PLACEHOLDER_API)) return null;
|
if (!settings.getProperty(HooksSettings.PLACEHOLDER_API)) return null;
|
||||||
|
AuthMeApi authMeApi = AuthMeApi.getInstance();
|
||||||
|
if (authMeApi == null) return null;
|
||||||
if (params.equalsIgnoreCase("version")) {
|
if (params.equalsIgnoreCase("version")) {
|
||||||
return getVersion();
|
return getVersion();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ public final class RestrictionSettings implements SettingsHolder {
|
|||||||
|
|
||||||
@Comment("Regex syntax for allowed chars in email.")
|
@Comment("Regex syntax for allowed chars in email.")
|
||||||
public static final Property<String> ALLOWED_EMAIL_REGEX =
|
public static final Property<String> ALLOWED_EMAIL_REGEX =
|
||||||
newProperty("settings.restrictions.allowedEmailCharacters", "^[A-Za-z0-9_.]{3,20}@(qq|outlook|163|gmail|icloud)\\.com$");
|
newProperty("settings.restrictions.allowedEmailCharacters", "^([a-zA-Z0-9_.+-]+)@([a-zA-Z0-9-]+)\\.([a-zA-Z]{2,})$");
|
||||||
|
|
||||||
|
|
||||||
@Comment("Force survival gamemode when player joins?")
|
@Comment("Force survival gamemode when player joins?")
|
||||||
|
|||||||
@@ -62,6 +62,11 @@ public final class SecuritySettings implements SettingsHolder {
|
|||||||
public static final Property<Integer> HAVE_I_BEEN_PWNED_LIMIT =
|
public static final Property<Integer> HAVE_I_BEEN_PWNED_LIMIT =
|
||||||
newProperty("Security.account.haveIBeenPwned.limit", 0);
|
newProperty("Security.account.haveIBeenPwned.limit", 0);
|
||||||
|
|
||||||
|
@Comment({"Require email verification when changing password if email feature enabled.",
|
||||||
|
"Original behavior is true"})
|
||||||
|
public static final Property<Boolean> CHANGE_PASSWORD_EMAIL_VERIFICATION_REQUIRED =
|
||||||
|
newProperty("Security.account.emailVerification.required", true);
|
||||||
|
|
||||||
@Comment("Enable captcha when a player uses wrong password too many times")
|
@Comment("Enable captcha when a player uses wrong password too many times")
|
||||||
public static final Property<Boolean> ENABLE_LOGIN_FAILURE_CAPTCHA =
|
public static final Property<Boolean> ENABLE_LOGIN_FAILURE_CAPTCHA =
|
||||||
newProperty("Security.captcha.useCaptcha", false);
|
newProperty("Security.captcha.useCaptcha", false);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ description: A fork of AuthMeReloaded that contains bug fixes
|
|||||||
# noinspection YAMLSchemaValidation
|
# noinspection YAMLSchemaValidation
|
||||||
main: ${pluginDescription.main}
|
main: ${pluginDescription.main}
|
||||||
folia-supported: true
|
folia-supported: true
|
||||||
version: 5.7.0-FORK-b52
|
version: 5.7.0-FORK-b53
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
softdepend:
|
softdepend:
|
||||||
- Vault
|
- Vault
|
||||||
|
|||||||
Reference in New Issue
Block a user