geforkt von Mirrors/Paper
A plugin's name can now only contain: [A-Za-z0-9()\[\]{}_.-]
By: Erik Broes <erikbroes@grum.nl>
Dieser Commit ist enthalten in:
Ursprung
0d5f7ece8a
Commit
434f054e38
@ -132,6 +132,10 @@ public final class PluginDescriptionFile {
|
|||||||
private void loadMap(Map<String, Object> map) throws InvalidDescriptionException {
|
private void loadMap(Map<String, Object> map) throws InvalidDescriptionException {
|
||||||
try {
|
try {
|
||||||
name = map.get("name").toString();
|
name = map.get("name").toString();
|
||||||
|
|
||||||
|
if (!name.matches("^[A-Za-z0-9()\\[\\]{}_.-]+$")) {
|
||||||
|
throw new InvalidDescriptionException("name '" + name + "' contains invalid characters.");
|
||||||
|
}
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
throw new InvalidDescriptionException(ex, "name is not defined");
|
throw new InvalidDescriptionException(ex, "name is not defined");
|
||||||
} catch (ClassCastException ex) {
|
} catch (ClassCastException ex) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren