mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Add additional check for playlistName
This commit is contained in:
parent
4765348107
commit
d7ce9dca61
2 changed files with 10 additions and 1 deletions
|
@ -15,6 +15,10 @@ function isSafePath (p: string) {
|
|||
})
|
||||
}
|
||||
|
||||
function isSafePeerTubeFilenameWithoutExtension (filename: string) {
|
||||
return filename.match(/^[a-z0-9-]+$/)
|
||||
}
|
||||
|
||||
function isArray (value: any): value is any[] {
|
||||
return Array.isArray(value)
|
||||
}
|
||||
|
@ -172,5 +176,6 @@ export {
|
|||
areUUIDsValid,
|
||||
toIntArray,
|
||||
isFileValid,
|
||||
isSafePeerTubeFilenameWithoutExtension,
|
||||
checkMimetypeRegex
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue