| 450 | /** Validate a single string argument coming from network. */ |
| 451 | template <class T> |
| 452 | static inline void SanitizeSingleStringHelper([[maybe_unused]] CommandFlags cmd_flags, T &data) |
| 453 | { |
| 454 | if constexpr (std::is_same_v<std::string, T>) { |
| 455 | if (!_network_server && cmd_flags.Test(CommandFlag::StrCtrl)) { |
| 456 | StrMakeValidInPlace(data, {StringValidationSetting::AllowControlCode, StringValidationSetting::ReplaceWithQuestionMark}); |
| 457 | } else { |
| 458 | StrMakeValidInPlace(data, {StringValidationSetting::ReplaceWithQuestionMark}); |
| 459 | } |
| 460 | } |
| 461 | } |
| 462 | |
| 463 | /** Helper function to perform validation on command data strings. */ |
| 464 | template <class Ttuple, size_t... Tindices> |
no test coverage detected