Skip to content

Commit

Permalink
Merge pull request rdkcentral#5636 from vdinak240/DELIA-66123
Browse files Browse the repository at this point in the history
DELIA-66123 : Validate text provided from app
  • Loading branch information
anand-ky committed Sep 3, 2024
2 parents ca30878 + 87c3eeb commit 3c11e1a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TextToSpeech/impl/TTSManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ TTS_Error TTSManager::speak(int speechId, std::string callsign, std::string text
return TTS_INVALID_CONFIGURATION;
}

if(text.empty() || text.find_first_not_of(' ') == std::string::npos) {
TTSLOG_ERROR("Invalid Text Provided from app");
return TTS_FAIL;
}

if(m_speaker) {
// TODO: Currently 'secure' is set to true. Need to decide about this variable while Resident app integration.
if(checkAccess("speak", callsign))
Expand Down

0 comments on commit 3c11e1a

Please sign in to comment.