Accept . _ and 0-9 plugin names

pull/2386/head
Chocobozzz 2020-01-06 16:20:01 +01:00
parent 218b0874ed
commit c10b638c4b
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -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-'))
}