Skip to content

Commit

Permalink
Fixed: urlDecode done before parsing args (#2956)
Browse files Browse the repository at this point in the history
  • Loading branch information
DottoreTozzi authored and igrr committed Aug 1, 2017
1 parent f05ed6e commit f5b6e16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/ESP8266WebServer/src/Parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bool ESP8266WebServer::_parseRequest(WiFiClient& client) {
String searchStr = "";
int hasSearch = url.indexOf('?');
if (hasSearch != -1){
searchStr = urlDecode(url.substring(hasSearch + 1));
searchStr = url.substring(hasSearch + 1);
url = url.substring(0, hasSearch);
}
_currentUri = url;
Expand Down Expand Up @@ -318,7 +318,7 @@ void ESP8266WebServer::_parseArguments(String data) {
}
RequestArgument& arg = _currentArgs[iarg];
arg.key = data.substring(pos, equal_sign_index);
arg.value = data.substring(equal_sign_index + 1, next_arg_index);
arg.value = urlDecode(data.substring(equal_sign_index + 1, next_arg_index));
#ifdef DEBUG_ESP_HTTP_SERVER
DEBUG_OUTPUT.print("arg ");
DEBUG_OUTPUT.print(iarg);
Expand Down

0 comments on commit f5b6e16

Please sign in to comment.