add null termination when writing http auth info
This commit is contained in:
parent
dae545a63e
commit
d489126f14
|
@ -458,9 +458,9 @@ void ota_begin()
|
|||
if(!value.compareTo("yes"))
|
||||
use_auth = true;
|
||||
} else if(!arg.compareTo("webui_username")) {
|
||||
ESPMega_FRAM.write(EEPROM_ADDRESS_WEBUI_USERNAME, (uint8_t *)value.c_str(), value.length());
|
||||
ESPMega_FRAM.write(EEPROM_ADDRESS_WEBUI_USERNAME, (uint8_t *)value.c_str(), value.length()+1);
|
||||
} else if(!arg.compareTo("webui_password")) {
|
||||
ESPMega_FRAM.write(EEPROM_ADDRESS_WEBUI_PASSWORD, (uint8_t *)value.c_str(), value.length());
|
||||
ESPMega_FRAM.write(EEPROM_ADDRESS_WEBUI_PASSWORD, (uint8_t *)value.c_str(), value.length()+1);
|
||||
}
|
||||
}
|
||||
set_mqtt_useauth(use_auth);
|
||||
|
|
Loading…
Reference in New Issue