mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-24 09:59:42 -05:00
[Bleeding] Blacklist certain plugin names
By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
1 parent
4d3aba0a11
commit
e833c88a72
2 files changed
+8
-2
No files matched your search
@@ -207,7 +207,7 @@ public final class PluginDescriptionFile {
|
||||
* @param mainClass Full location of the main class of this plugin
|
||||
*/
|
||||
public PluginDescriptionFile(final String pluginName, final String pluginVersion, final String mainClass) {
|
||||
name = pluginName;
|
||||
name = pluginName.replace(' ', '_');
|
||||
version = pluginVersion;
|
||||
main = mainClass;
|
||||
}
|
||||
@@ -801,6 +801,7 @@ public final class PluginDescriptionFile {
|
||||
if (!name.matches("^[A-Za-z0-9 _.-]+$")) {
|
||||
throw new InvalidDescriptionException("name '" + name + "' contains invalid characters.");
|
||||
}
|
||||
name = name.replace(' ', '_');
|
||||
} catch (NullPointerException ex) {
|
||||
throw new InvalidDescriptionException(ex, "name is not defined");
|
||||
} catch (ClassCastException ex) {
|
||||
|
||||
Reference in new issue
Block a user