obs-studio/UI/cmake/feature-restream.cmake
Ryan Foster 3239e2a1f2 UI: Restrict regex pattern for OAuth secrets
The current regex pattern will successfully match if the cache variable
contains the pattern anywhere inside the string. Let's restrict the
regex pattern such that it requires the pattern to be precisely between
the beginning and end of the string with no other characters in between
those anchor points.
2023-09-06 15:06:59 -04:00

11 lines
389 B
CMake

if(RESTREAM_CLIENTID
AND RESTREAM_HASH MATCHES "^(0|[a-fA-F0-9]+)$"
AND TARGET OBS::browser-panels)
target_sources(obs-studio PRIVATE auth-restream.cpp auth-restream.hpp)
target_enable_feature(obs-studio "Restream API connection" RESTREAM_ENABLED)
else()
target_disable_feature(obs-studio "Restream API connection")
set(RESTREAM_CLIENTID "")
set(RESTREAM_HASH "0")
endif()