From c10b638c4b52e9766ef68b58849ee0728647988f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 6 Jan 2020 16:20:01 +0100 Subject: [PATCH] Accept . _ and 0-9 plugin names --- server/helpers/custom-validators/plugins.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/helpers/custom-validators/plugins.ts b/server/helpers/custom-validators/plugins.ts index 2e3175742..332418b49 100644 --- a/server/helpers/custom-validators/plugins.ts +++ b/server/helpers/custom-validators/plugins.ts @@ -20,7 +20,7 @@ function isPluginNameValid (value: string) { function isNpmPluginNameValid (value: string) { return exists(value) && validator.isLength(value, PLUGINS_CONSTRAINTS_FIELDS.NAME) && - validator.matches(value, /^[a-z\-]+$/) && + validator.matches(value, /^[a-z\-._0-9]+$/) && (value.startsWith('peertube-plugin-') || value.startsWith('peertube-theme-')) } -- 2.41.0