Skip to content

Commit f5b6e16

Browse files
DottoreTozziigrr
authored andcommitted
Fixed: urlDecode done before parsing args (#2956)
1 parent f05ed6e commit f5b6e16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/ESP8266WebServer/src/Parsing.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ bool ESP8266WebServer::_parseRequest(WiFiClient& client) {
9191
String searchStr = "";
9292
int hasSearch = url.indexOf('?');
9393
if (hasSearch != -1){
94-
searchStr = urlDecode(url.substring(hasSearch + 1));
94+
searchStr = url.substring(hasSearch + 1);
9595
url = url.substring(0, hasSearch);
9696
}
9797
_currentUri = url;
@@ -318,7 +318,7 @@ void ESP8266WebServer::_parseArguments(String data) {
318318
}
319319
RequestArgument& arg = _currentArgs[iarg];
320320
arg.key = data.substring(pos, equal_sign_index);
321-
arg.value = data.substring(equal_sign_index + 1, next_arg_index);
321+
arg.value = urlDecode(data.substring(equal_sign_index + 1, next_arg_index));
322322
#ifdef DEBUG_ESP_HTTP_SERVER
323323
DEBUG_OUTPUT.print("arg ");
324324
DEBUG_OUTPUT.print(iarg);

0 commit comments

Comments
 (0)