mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-25 12:32:01 -08:00
Allow dot and tilde as part of the RTSP URL
This commit is contained in:
parent
3107b09dfe
commit
bee089aced
1 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ const userPassSupportedChars = "A-Z,0-9,!,$,(,),*,+,.,;,<,=,>,[,],^,_,-,{,}"
|
|||
|
||||
var reUserPass = regexp.MustCompile(`^[a-zA-Z0-9!\$\(\)\*\+\.;<=>\[\]\^_\-\{\}]+$`)
|
||||
|
||||
var rePathName = regexp.MustCompile(`^[0-9a-zA-Z_\-/]+$`)
|
||||
var rePathName = regexp.MustCompile(`^[0-9a-zA-Z_\-/\.~]+$`)
|
||||
|
||||
func parseIPCidrList(in []string) ([]interface{}, error) {
|
||||
if len(in) == 0 {
|
||||
|
|
@ -58,7 +58,7 @@ func CheckPathName(name string) error {
|
|||
}
|
||||
|
||||
if !rePathName.MatchString(name) {
|
||||
return fmt.Errorf("can contain only alfanumeric characters, underscore, minus or slash")
|
||||
return fmt.Errorf("can contain only alfanumeric characters, underscore, dot, tilde, minus or slash")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue