Releaxed clientinit values

This commit is contained in:
WolverinDEV 2021-04-27 15:50:08 +02:00
parent 0aad154c15
commit 03312b89c7
1 changed files with 10 additions and 4 deletions

View File

@ -154,10 +154,10 @@ command_result SpeakingClient::applyClientInitParameters(Command &cmd) {
this->properties()[property::CLIENT_OUTPUT_MUTED] = cmd[key].as<bool>();
} 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 {