From 4aa69b1dfec13b0794b3b45d72cf0e48541ba248 Mon Sep 17 00:00:00 2001 From: Fabian Becker <halfdan@xnorfz.de> Date: Sat, 26 Dec 2015 23:53:46 +0100 Subject: [PATCH] Limit plugin name to 40 characters closes #9275 --- plugins/CoreConsole/Commands/GeneratePlugin.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/CoreConsole/Commands/GeneratePlugin.php b/plugins/CoreConsole/Commands/GeneratePlugin.php index bf83889305..45fa111d87 100644 --- a/plugins/CoreConsole/Commands/GeneratePlugin.php +++ b/plugins/CoreConsole/Commands/GeneratePlugin.php @@ -126,6 +126,10 @@ class GeneratePlugin extends GeneratePluginBase throw new \RuntimeException('You have to enter a plugin name'); } + if(strlen($pluginName) > 40) { + throw new \RuntimeException('Your plugin name cannot be longer than 40 characters'); + } + if (!Plugin\Manager::getInstance()->isValidPluginName($pluginName)) { throw new \RuntimeException(sprintf('The plugin name %s is not valid. The name must start with a letter and is only allowed to contain numbers and letters.', $pluginName)); } -- GitLab