From: Chocobozzz Date: Thu, 30 Apr 2020 14:32:24 +0000 (+0200) Subject: Accept numbers in plugin names X-Git-Tag: v2.2.0-rc.1~101 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=inline;h=5644f9b0351c71601312b13c49d89b0ce05c74e3;p=github%2FChocobozzz%2FPeerTube.git Accept numbers in plugin names --- diff --git a/server/helpers/custom-validators/plugins.ts b/server/helpers/custom-validators/plugins.ts index 5a4531f72..d2fc03936 100644 --- a/server/helpers/custom-validators/plugins.ts +++ b/server/helpers/custom-validators/plugins.ts @@ -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) {