]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Accept numbers in plugin names
authorChocobozzz <me@florianbigard.com>
Thu, 30 Apr 2020 14:32:24 +0000 (16:32 +0200)
committerChocobozzz <chocobozzz@cpy.re>
Mon, 4 May 2020 14:21:39 +0000 (16:21 +0200)
server/helpers/custom-validators/plugins.ts

index 5a4531f72ebdea684bdddcb105276d2c0497639f..d2fc0393623012de00ecf12b612586c580a0bd9a 100644 (file)
@@ -14,7 +14,7 @@ function isPluginTypeValid (value: any) {
 function isPluginNameValid (value: string) {
   return exists(value) &&
     validator.isLength(value, PLUGINS_CONSTRAINTS_FIELDS.NAME) &&
-    validator.matches(value, /^[a-z-]+$/)
+    validator.matches(value, /^[a-z-0-9]+$/)
 }
 
 function isNpmPluginNameValid (value: string) {