MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / containsSensitiveData

Function containsSensitiveData

lib/general.cpp:320–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320static bool containsSensitiveData(obs_data_t *data)
321{
322 // Only checking for Twitch tokens and websocket connections for now
323 // Might have to be expanded upon / generalized in the future
324 OBSDataArrayAutoRelease twitchTokens =
325 obs_data_get_array(data, "twitchConnections");
326 OBSDataArrayAutoRelease websocketConnections =
327 obs_data_get_array(data, "websocketConnections");
328 OBSDataArrayAutoRelease mqttConnections =
329 obs_data_get_array(data, "mqttConnections");
330
331 auto isNotEmpty = [](obs_data_array *array) {
332 return obs_data_array_count(array) > 0;
333 };
334
335 return isNotEmpty(twitchTokens) || isNotEmpty(websocketConnections) ||
336 isNotEmpty(mqttConnections);
337}
338
339void AdvSceneSwitcher::on_exportSettings_clicked()
340{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected