Strip servers with empty name
This commit is contained in:
parent
8a9fe6d78f
commit
5bc79bac59
@ -632,8 +632,8 @@ namespace Components
|
|||||||
server.hostname = server.hostname.substr(0, MAX_SERVER_NAME_LENGTH);
|
server.hostname = server.hostname.substr(0, MAX_SERVER_NAME_LENGTH);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
const auto strippedHostName = TextRenderer::StripMaterialTextIcons(server.hostname);
|
||||||
if (server.hostname.empty() || TextRenderer::StripMaterialTextIcons(server.hostname).empty())
|
if (server.hostname.empty() || strippedHostName.empty() || std::all_of(strippedHostName.begin(), strippedHostName.end(), isspace))
|
||||||
{
|
{
|
||||||
// Invalid server name containing only emojis
|
// Invalid server name containing only emojis
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user