The application was vulnerable to command injection because user input was passed directly to std::system().
Introduced a safe()/secureInput() validation function.
Implemented a blacklist for dangerous shell characters (e.g., ;, &, |, `).
Ensured that any target input is strictly validated before being appended to system commands.
The application was vulnerable to command injection because user input was passed directly to std::system().
Introduced a safe()/secureInput() validation function.
Implemented a blacklist for dangerous shell characters (e.g., ;, &, |, `).
Ensured that any target input is strictly validated before being appended to system commands.