From bee089aced2bd4fe5d8b76fa706b04ab508ce771 Mon Sep 17 00:00:00 2001 From: frjol Date: Thu, 22 Jul 2021 11:47:59 -0400 Subject: [PATCH] Allow dot and tilde as part of the RTSP URL --- internal/conf/path.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/conf/path.go b/internal/conf/path.go index 3035fdb9..fb53b7dd 100644 --- a/internal/conf/path.go +++ b/internal/conf/path.go @@ -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