mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
3239e2a1f2
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.
11 lines
371 B
CMake
11 lines
371 B
CMake
if(TWITCH_CLIENTID
|
|
AND TWITCH_HASH MATCHES "^(0|[a-fA-F0-9]+)$"
|
|
AND TARGET OBS::browser-panels)
|
|
target_sources(obs-studio PRIVATE auth-twitch.cpp auth-twitch.hpp)
|
|
target_enable_feature(obs-studio "Twitch API connection" TWITCH_ENABLED)
|
|
else()
|
|
target_disable_feature(obs-studio "Twitch API connection")
|
|
set(TWITCH_CLIENTID "")
|
|
set(TWITCH_HASH "0")
|
|
endif()
|