diff --git a/firmware/0x02000.bin b/firmware/0x02000.bin index e8c1d33..8ad58f1 100644 Binary files a/firmware/0x02000.bin and b/firmware/0x02000.bin differ diff --git a/firmware/0x82000.bin b/firmware/0x82000.bin index 176f2e2..a172c70 100644 Binary files a/firmware/0x82000.bin and b/firmware/0x82000.bin differ diff --git a/firmware/sha1sums b/firmware/sha1sums index 30b2c24..5251822 100644 --- a/firmware/sha1sums +++ b/firmware/sha1sums @@ -1,3 +1,3 @@ -2dd44516882b6f950962565d509b150e3e80696d firmware/0x02000.bin -b358bd8bff5dc075a4872a9cbbdf67d938b041c3 firmware/0x82000.bin +4242c10cecaa314ec94e9799ed92209a67a0ee77 firmware/0x02000.bin +f5c525b88e5254bcae044e53bb587b4d4bdc168f firmware/0x82000.bin 9bd7d25204d71b3db5f35e0b2def8a6aaa7f765c firmware/0x00000.bin diff --git a/user/config_flash.c b/user/config_flash.c index df62423..5eac5a4 100644 --- a/user/config_flash.c +++ b/user/config_flash.c @@ -46,6 +46,7 @@ uint32_t reg0, reg1, reg3; //os_printf("%02x:%02x:%02x\r\n", reg0, reg1, reg3); //os_printf("STA: %02x:%02x:%02x:%02x:%02x:%02x\r\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + //os_printf("Config block: %d\r\n", sizeof(sysconfig_t)); os_memcpy(config->STA_MAC_address, mac, 6); mac[0] |= 0x02; diff --git a/user/config_flash.h b/user/config_flash.h index 54b0a15..4b92119 100644 --- a/user/config_flash.h +++ b/user/config_flash.h @@ -58,7 +58,7 @@ typedef struct { uint8_t PEAP_username[64]; // PEAP enterprise username uint8_t PEAP_password[32]; // PEAP enterprise password #endif - uint8_t lock_password[32]; // Password of config lock + uint8_t lock_password[64]; // Password of config lock uint8_t locked; // Should we allow for config changes int32_t ap_watchdog; // Seconds without ap traffic will cause reset (-1 off, default) diff --git a/user/user_config.h b/user/user_config.h index 51e9eef..97d2215 100644 --- a/user/user_config.h +++ b/user/user_config.h @@ -1,7 +1,7 @@ #ifndef _USER_CONFIG_ #define _USER_CONFIG_ -#define ESP_REPEATER_VERSION "V2.2.9" +#define ESP_REPEATER_VERSION "V2.2.10" #define LOCAL_ACCESS 0x01 #define REMOTE_ACCESS 0x02 diff --git a/user/user_main.c b/user/user_main.c index 28b3ced..adc54f8 100644 --- a/user/user_main.c +++ b/user/user_main.c @@ -2179,6 +2179,11 @@ void ICACHE_FLASH_ATTR console_handle_command(struct espconn *pespconn) } else if (nTokens == 2) { + if (os_strlen(tokens[1]) > sizeof(config.lock_password)-1) + { + os_sprintf_flash(response, "Password too long\r\n"); + goto command_handled; + } os_sprintf(config.lock_password, "%s", tokens[1]); } else @@ -2308,6 +2313,11 @@ void ICACHE_FLASH_ATTR console_handle_command(struct espconn *pespconn) if (strcmp(tokens[1], "password") == 0) { + if (os_strlen(tokens[2]) > sizeof(config.password)-1) + { + os_sprintf_flash(response, "Password too long\r\n"); + goto command_handled; + } os_sprintf(config.password, "%s", tokens[2]); if (config.automesh_mode != AUTOMESH_OFF) {