Skip to content

Commit

Permalink
Fix config mode JSON handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Roger committed Apr 17, 2016
1 parent 8c57478 commit f7be173
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Homie/Boot/BootConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void BootConfig::_onConfigRequest() {
}

StaticJsonBuffer<MAX_JSON_CONFIG_ARDUINOJSON_BUFFER_SIZE> parseJsonBuffer;
JsonObject& parsedJson = parseJsonBuffer.parseObject(this->_http.arg("plain"));
JsonObject& parsedJson = parseJsonBuffer.parseObject((char*)this->_http.arg("plain").c_str()); // do not use plain String, else fails
if (!parsedJson.success()) {
Logger.logln(F("✖ Invalid or too big JSON"));
this->_http.send(400, FPSTR(PROGMEM_CONFIG_APPLICATION_JSON), FPSTR(PROGMEM_CONFIG_JSON_FAILURE));
Expand Down

0 comments on commit f7be173

Please sign in to comment.