#1016 Deprecate MD5, SHA1, SHA512: no longer allowed for active use
- Deprecate unsalted hashes: if such a hash is configured, move it to the legacy hashes setting to still support the existing hashes in the database but hash all passwords from now on with our default, SHA256.
This commit is contained in:
@@ -3,8 +3,8 @@ package fr.xephi.authme.settings;
|
||||
import ch.jalu.configme.properties.Property;
|
||||
import ch.jalu.configme.resource.PropertyResource;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -27,9 +27,9 @@ public class EnumSetProperty<E extends Enum<E>> extends Property<Set<E>> {
|
||||
|
||||
@Override
|
||||
protected Set<E> getFromResource(PropertyResource resource) {
|
||||
List<?> elements = resource.getList(getPath());
|
||||
if (elements != null) {
|
||||
return elements.stream()
|
||||
Object entry = resource.getObject(getPath());
|
||||
if (entry instanceof Collection<?>) {
|
||||
return ((Collection<?>) entry).stream()
|
||||
.map(val -> toEnum(String.valueOf(val)))
|
||||
.filter(e -> e != null)
|
||||
.collect(Collectors.toCollection(LinkedHashSet::new));
|
||||
|
||||
Reference in New Issue
Block a user