Revert "Validate MQTT broker IP and escape quotes when displaying"
This commit is contained in:
parent
3800cb18a9
commit
c558e1a559
2 changed files with 5 additions and 47 deletions
|
@ -64,9 +64,6 @@
|
|||
*/
|
||||
static const char *broker_ip = "0064:ff9b:0000:0000:0000:0000:b8ac:7cbd";
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define ADDRESS_CONVERSION_OK 1
|
||||
#define ADDRESS_CONVERSION_ERROR 0
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/*
|
||||
* A timeout used when waiting for something to happen (e.g. to connect or to
|
||||
* disconnect)
|
||||
|
@ -359,14 +356,7 @@ ip_addr_post_handler(char *key, int key_len, char *val, int val_len)
|
|||
return HTTPD_SIMPLE_POST_HANDLER_UNKNOWN;
|
||||
}
|
||||
|
||||
/*
|
||||
* uiplib_ip6addrconv will immediately start writing into the supplied buffer
|
||||
* even if it subsequently fails. Thus, pass an intermediate buffer
|
||||
*/
|
||||
uip_ip6addr_t tmp_addr;
|
||||
|
||||
if(val_len > MQTT_CLIENT_CONFIG_IP_ADDR_STR_LEN
|
||||
|| uiplib_ip6addrconv(val, &tmp_addr) != ADDRESS_CONVERSION_OK) {
|
||||
if(val_len > MQTT_CLIENT_CONFIG_IP_ADDR_STR_LEN) {
|
||||
/* Ours but bad value */
|
||||
rv = HTTPD_SIMPLE_POST_HANDLER_ERROR;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue