| 355 | /** Validate a single string argument coming from network. */ |
| 356 | template <class T> |
| 357 | static inline void SanitizeSingleStringHelper(T &data) |
| 358 | { |
| 359 | if constexpr (std::is_same_v<std::string, T>) { |
| 360 | /* The string must be valid, i.e. not contain special codes. Since some |
| 361 | * can be made with GSText, make sure the control codes are removed. */ |
| 362 | ::StrMakeValidInPlace(data, {}); |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | /** Helper function to perform validation on command data strings. */ |
| 367 | template <class Ttuple, size_t... Tindices> |
no test coverage detected