mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-30 15:02:00 -08:00
parent
74bfb988d7
commit
5013d585fc
1 changed files with 2 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/bluenviron/mediamtx/internal/logger"
|
||||
)
|
||||
|
||||
var rePathName = regexp.MustCompile(`^[0-9a-zA-Z_\-/\.~]+$`)
|
||||
var rePathName = regexp.MustCompile(`^[0-9a-zA-Z_\-/\.~:]+$`)
|
||||
|
||||
// IsValidPathName checks whether the path name is valid.
|
||||
func IsValidPathName(name string) error {
|
||||
|
|
@ -31,7 +31,7 @@ func IsValidPathName(name string) error {
|
|||
}
|
||||
|
||||
if !rePathName.MatchString(name) {
|
||||
return fmt.Errorf("can contain only alphanumeric characters, underscore, dot, tilde, minus or slash")
|
||||
return fmt.Errorf("can contain only alphanumeric characters, underscore, dot, tilde, minus, slash, colon")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue