diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-06 16:20:01 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-01-06 16:20:01 +0100 |
commit | c10b638c4b52e9766ef68b58849ee0728647988f (patch) | |
tree | 84e1ed3a65e750bff1a7cd097d2d5e79cc919a87 /server/helpers/custom-validators/plugins.ts | |
parent | 218b0874ede2f0d35fdbcfb64dbe19083b0a2b04 (diff) | |
download | PeerTube-c10b638c4b52e9766ef68b58849ee0728647988f.tar.gz PeerTube-c10b638c4b52e9766ef68b58849ee0728647988f.tar.zst PeerTube-c10b638c4b52e9766ef68b58849ee0728647988f.zip |
Accept . _ and 0-9 plugin names
Diffstat (limited to 'server/helpers/custom-validators/plugins.ts')
-rw-r--r-- | server/helpers/custom-validators/plugins.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
20 | function isNpmPluginNameValid (value: string) { | 20 | function isNpmPluginNameValid (value: string) { |
21 | return exists(value) && | 21 | return exists(value) && |
22 | validator.isLength(value, PLUGINS_CONSTRAINTS_FIELDS.NAME) && | 22 | validator.isLength(value, PLUGINS_CONSTRAINTS_FIELDS.NAME) && |
23 | validator.matches(value, /^[a-z\-]+$/) && | 23 | validator.matches(value, /^[a-z\-._0-9]+$/) && |
24 | (value.startsWith('peertube-plugin-') || value.startsWith('peertube-theme-')) | 24 | (value.startsWith('peertube-plugin-') || value.startsWith('peertube-theme-')) |
25 | } | 25 | } |
26 | 26 | ||