Skip to content

Commit 5013d58

Browse files
authored
allow using colon in path names (#4377) (#4519)
1 parent 74bfb98 commit 5013d58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/conf/path.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/bluenviron/mediamtx/internal/logger"
1515
)
1616

17-
var rePathName = regexp.MustCompile(`^[0-9a-zA-Z_\-/\.~]+$`)
17+
var rePathName = regexp.MustCompile(`^[0-9a-zA-Z_\-/\.~:]+$`)
1818

1919
// IsValidPathName checks whether the path name is valid.
2020
func IsValidPathName(name string) error {
@@ -31,7 +31,7 @@ func IsValidPathName(name string) error {
3131
}
3232

3333
if !rePathName.MatchString(name) {
34-
return fmt.Errorf("can contain only alphanumeric characters, underscore, dot, tilde, minus or slash")
34+
return fmt.Errorf("can contain only alphanumeric characters, underscore, dot, tilde, minus, slash, colon")
3535
}
3636

3737
return nil

0 commit comments

Comments
 (0)