From: Torsten Dreyer Date: Tue, 17 Mar 2015 08:27:03 +0000 (+0100) Subject: PropertyChangeWebsocket: sanitize property names X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3ee36a71435ea6302c8c212fb044cf2168dfa8b3;p=flightgear.git PropertyChangeWebsocket: sanitize property names --- diff --git a/src/Network/http/PropertyChangeWebsocket.cxx b/src/Network/http/PropertyChangeWebsocket.cxx index 0d08fc367..c1c23b516 100644 --- a/src/Network/http/PropertyChangeWebsocket.cxx +++ b/src/Network/http/PropertyChangeWebsocket.cxx @@ -174,7 +174,7 @@ void PropertyChangeWebsocket::handleRequest(const HTTPRequest & request, Websock string_list nodeNames; j = cJSON_GetObjectItem(json, "node"); if ( NULL != j && NULL != j->valuestring) { - nodeNames.push_back(j->valuestring); + nodeNames.push_back(simgear::strutils::strip(string(j->valuestring))); } cJSON * nodes = cJSON_GetObjectItem(json, "nodes"); @@ -183,7 +183,7 @@ void PropertyChangeWebsocket::handleRequest(const HTTPRequest & request, Websock cJSON * node = cJSON_GetArrayItem(nodes, i); if ( NULL == node) continue; if ( NULL == node->valuestring) continue; - nodeNames.push_back(node->valuestring); + nodeNames.push_back(simgear::strutils::strip(string(node->valuestring))); } }