mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
nhttpd: dont doubles decode, revert ed318d97bc
This commit is contained in:
@@ -561,7 +561,7 @@ void CControlAPI::MessageCGI(CyhookHandler *hh)
|
|||||||
|
|
||||||
if (event != 0)
|
if (event != 0)
|
||||||
{
|
{
|
||||||
message=decodeString(message);
|
//message=decodeString(message);
|
||||||
NeutrinoAPI->EventServer->sendEvent(event, CEventServer::INITID_HTTPD, (void *) message.c_str(), message.length() + 1);
|
NeutrinoAPI->EventServer->sendEvent(event, CEventServer::INITID_HTTPD, (void *) message.c_str(), message.length() + 1);
|
||||||
hh->SendOk();
|
hh->SendOk();
|
||||||
}
|
}
|
||||||
|
@@ -161,11 +161,7 @@ bool CWebserverRequest::ParseParams(std::string param_string) {
|
|||||||
if (!ySplitStringExact(param_string, "&", param, param_string))
|
if (!ySplitStringExact(param_string, "&", param, param_string))
|
||||||
ende = true;
|
ende = true;
|
||||||
if (ySplitStringExact(param, "=", name, value)) {
|
if (ySplitStringExact(param, "=", name, value)) {
|
||||||
if("channelname" == name){//skip doubles decode on channlename
|
value = trim(decodeString(value));
|
||||||
value = trim((value));
|
|
||||||
}else{
|
|
||||||
value = trim(decodeString(value));
|
|
||||||
}
|
|
||||||
if (ParameterList[name].empty())
|
if (ParameterList[name].empty())
|
||||||
ParameterList[name] = value;
|
ParameterList[name] = value;
|
||||||
else {
|
else {
|
||||||
@@ -215,7 +211,7 @@ bool CWebserverRequest::ParseHeader(std::string header) {
|
|||||||
void CWebserverRequest::analyzeURL(std::string url) {
|
void CWebserverRequest::analyzeURL(std::string url) {
|
||||||
ParameterList.clear();
|
ParameterList.clear();
|
||||||
// URI decode
|
// URI decode
|
||||||
url = decodeString(url);
|
//url = decodeString(url);
|
||||||
url = trim(url, "\r\n"); // non-HTTP-Standard: allow \r or \n in URL. Delete it.
|
url = trim(url, "\r\n"); // non-HTTP-Standard: allow \r or \n in URL. Delete it.
|
||||||
UrlData["fullurl"] = url;
|
UrlData["fullurl"] = url;
|
||||||
// split Params
|
// split Params
|
||||||
|
Reference in New Issue
Block a user