projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
218b087
)
Accept . _ and 0-9 plugin names
author
Chocobozzz
<me@florianbigard.com>
Mon, 6 Jan 2020 15:20:01 +0000
(16:20 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Mon, 6 Jan 2020 15:20:01 +0000
(16:20 +0100)
server/helpers/custom-validators/plugins.ts
patch
|
blob
|
history
diff --git
a/server/helpers/custom-validators/plugins.ts
b/server/helpers/custom-validators/plugins.ts
index 2e317574232dae9357c5e8d9febde464a1f10b74..332418b49cc566574546c50052d9d1e6a1895f60 100644
(file)
--- 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-'))
}