mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
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.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
if(RESTREAM_CLIENTID
|
||||
AND RESTREAM_HASH MATCHES "(0|[a-fA-F0-9]+)"
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
if(TWITCH_CLIENTID
|
||||
AND TWITCH_HASH MATCHES "(0|[a-fA-F0-9]+)"
|
||||
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)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
if(YOUTUBE_CLIENTID
|
||||
AND YOUTUBE_SECRET
|
||||
AND YOUTUBE_CLIENTID_HASH MATCHES "(0|[a-fA-F0-9]+)"
|
||||
AND YOUTUBE_SECRET_HASH MATCHES "(0|[a-fA-F0-9]+)")
|
||||
AND YOUTUBE_CLIENTID_HASH MATCHES "^(0|[a-fA-F0-9]+)$"
|
||||
AND YOUTUBE_SECRET_HASH MATCHES "^(0|[a-fA-F0-9]+)$")
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
|
||||
Reference in New Issue
Block a user