diff --git a/server/src/client/SpeakingClient.cpp b/server/src/client/SpeakingClient.cpp index 7900ef5..ef3646b 100644 --- a/server/src/client/SpeakingClient.cpp +++ b/server/src/client/SpeakingClient.cpp @@ -154,10 +154,10 @@ command_result SpeakingClient::applyClientInitParameters(Command &cmd) { this->properties()[property::CLIENT_OUTPUT_MUTED] = cmd[key].as(); } else if(key == "client_default_channel") { auto value = cmd[key].string(); - if(value.length() > 255) { + if(value.length() > 512) { return command_result{error::parameter_invalid, "client_default_channel"}; } - this->properties()[property::CLIENT_DEFAULT_CHANNEL] = cmd[key].string(); + this->properties()[property::CLIENT_DEFAULT_CHANNEL] = value; } else if(key == "client_default_channel_password") { auto value = cmd[key].string(); if(value.length() > 255) { @@ -171,10 +171,10 @@ command_result SpeakingClient::applyClientInitParameters(Command &cmd) { if(value.length() > ts::config::server::limits::afk_message_length) { return command_result{error::parameter_invalid, "client_away_message"}; } - this->properties()[property::CLIENT_AWAY_MESSAGE] = cmd[key].string(); + this->properties()[property::CLIENT_AWAY_MESSAGE] = value; } else if(key == "client_badges") { auto value = cmd[key].string(); - if(value.length() > 255) { + if(value.length() > 400) { return command_result{error::parameter_invalid, "client_badges"}; } this->properties()[property::CLIENT_BADGES] = value; @@ -203,17 +203,23 @@ command_result SpeakingClient::applyClientInitParameters(Command &cmd) { } else if(key == "acTime" || key == "userPubKey" || key == "authSign" || key == "pubSign" || key == "pubSignCert") { /* Used for the MyTeamSpeak services. We don't store them. */ } else if(key == "client_integrations") { + /* TS3 specific parameters. Ignore these. Length is also just guessed */ +#if 0 auto value = cmd[key].string(); if(value.length() > 255) { return command_result{error::parameter_invalid, "client_integrations"}; } this->properties()[property::CLIENT_INTEGRATIONS] = cmd[key].string(); +#endif } else if(key == "client_active_integrations_info") { + /* TS3 specific parameters. Ignore these. Length is also just guessed */ +#if 0 auto value = cmd[key].string(); if(value.length() > 255) { return command_result{error::parameter_invalid, "client_active_integrations_info"}; } this->properties()[property::CLIENT_ACTIVE_INTEGRATIONS_INFO] = cmd[key].string(); +#endif } else if(key == "client_browser_engine") { /* Currently not really used but passed by the web client */ } else {