bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.69k stars 1.39k forks source link

Accept German Characters in Camera Path Validation #3413

Open MahmoudHassan77 opened 1 month ago

MahmoudHassan77 commented 1 month ago

Which version are you using?

v1.8.2

Which operating system are you using?

Describe the issue

The current implementation of the camera path validation regex does not accept German characters. This feature request is to enhance the regex pattern to support German characters (ä, ö, ü, Ä, Ö, Ü, ß).

Additionally, mediamtx can't read RTMP streams, resulting in the error [RTMP source] not enough bytes. This stream works fine with other RTMP clients (VLC, OBS, vMix, etc.).

Proposed Change: Modify the regex pattern in the line: var rePathName = regexp.MustCompile(^[0-9a-zA-Z_-/.~]+$)

to include German characters. The updated regex should look like this: var rePathName = regexp.MustCompile(^[0-9a-zA-Z_-/.~äöüÄÖÜß]+$)

Describe how to replicate the issue

Locate the line with the current regex pattern: var rePathName = regexp.MustCompile(^[0-9a-zA-Z-/.~]+$) Update it to include German characters: var rePathName = regexp.MustCompile(^[0-9a-zA-Z-/.~äöüÄÖÜß]+$) Test the validation to ensure it now accepts paths with German characters.

Did you attach the server logs?

invalid path name: can contain only alphanumeric characters, underscore, dot, tilde, minus or slash (I2_Kühlthekßä_4_Non_food)

Did you attach a network dump?

no