#850 Fix export of legacy hashes property

- Ugly workaround due to #1014: need to have EnumSetProperty extend from StringListProperty type so that it is exported in a proper manner (as a string list). To get an enum Set we need to call a dedicated method on EnumSetProperty for the time being.
This commit is contained in:
ljacqu
2016-11-22 22:02:34 +01:00
parent 7d65d2a7c4
commit d2a28bdaed
4 changed files with 31 additions and 24 deletions
@@ -6,7 +6,6 @@ import com.github.authme.configme.properties.Property;
import fr.xephi.authme.security.HashAlgorithm;
import fr.xephi.authme.settings.EnumSetProperty;
import java.util.Collections;
import java.util.List;
import static com.github.authme.configme.properties.PropertyInitializer.newLowercaseListProperty;
@@ -83,8 +82,8 @@ public class SecuritySettings implements SettingsHolder {
"legacyHashes:",
"- 'SHA1'"
})
public static final Property<List<HashAlgorithm>> LEGACY_HASHES =
new EnumSetProperty<>(HashAlgorithm.class, "settings.security.legacyHashes", Collections.emptyList());
public static final Property<List<String>> LEGACY_HASHES =
new EnumSetProperty<>(HashAlgorithm.class, "settings.security.legacyHashes");
@Comment({"Prevent unsafe passwords from being used; put them in lowercase!",
"You should always set 'help' as unsafePassword due to possible conflicts.",