VNC-151 Fix codec validation pattern

This commit is contained in:
El 2026-02-20 19:42:29 +00:00
parent e29d01f293
commit edd0b6ecaa
No known key found for this signature in database
GPG key ID: EB3F4C9EA29CDE59

View file

@ -2103,8 +2103,8 @@ sub DefineConfigToCLIConversion {
KasmVNC::ConfigKey->new({
name => "encoding.video_streaming_mode.codec",
validator => KasmVNC::PatternValidator->new({
pattern => qr/^(auto|h264|h264_vaapi|h264_nvenc|avc|avc_vaapi|avc_nvenc|h265|h265_vaapi|h265_nvenc|hevc|hevc_vaapi|hevc_nvenc|av1_vaapi|av1_nvenc)(,(auto|h264|h264_vaapi|h264_nvenc|avc|avc_vaapi|avc_nvenc|h265|h265_vaapi|h265_nvenc|hevc|hevc_vaapi|hevc_nvenc|av1_vaapi|av1_nvenc))*$/,
errorMessage => "must be one of [auto, h264, h264_vaapi, h264_nvenc, avc, avc_vaapi, avc_nvenc, h265, h265_vaapi, h265_nvenc, hevc, hevc_vaapi, hevc_nvenc, av1_vaapi, av1_nvenc] or a comma-separated list of those values"
pattern => qr/^\w+(?:,\w+)*$/,
errorMessage => "must be a comma-separated list of codec names, without spaces"
})
})
]