iotappstory / ESP-Library

Software Distribution and Management Over the Air
GNU Lesser General Public License v2.1
124 stars 35 forks source link

WLAN password field too short #51

Closed reibuehl closed 6 years ago

reibuehl commented 6 years ago

The config variable "password" is defined as char password[STRUCT_CHAR_ARRAY_SIZE]; in IOTAppStory.h and STRUCT_CHAR_ARRAY_SIZE is set to 50 there while WPA2 passwords can be up to 63 characters long. Please define STRUCT_PASSWORD_SIZE = 64 and then use that length for the password.

Onno-Dirkzwager commented 6 years ago

Reibuehl, thanks for the feedback. Will do, in the meantime you can change it in the .h file.

reibuehl commented 6 years ago

IOTAppStory.cpp also uses the define in three locations. I changed all to use a new define STRUCT_PASSWORD_SIZE but still can't connect and the debug output shows that only 49 chars are read. It seems that there is another limit on the HTML input field that I didn't find yet.

reibuehl commented 6 years ago

The maximum field length is also used once in WiFiManagerMod.h. After changing that to 63 in the HTML code, it seems to work.

Onno-Dirkzwager commented 6 years ago

Reibuehl, which version of the lib are you using? 2.0.0?

reibuehl commented 6 years ago

No, the 1.0.6 from the Arduino Library Manager.

Onno-Dirkzwager commented 6 years ago

You might be interested in the upcoming lib 2.0.0 Its not in Lib Manager yet. You can download it straight from the master. We are working on the documentation, website, video etc. So the best documentation we have currently is the readme file in the master.

Onno-Dirkzwager commented 6 years ago

Hi Reibuehl, I implemented your suggestion into the master (2.0.0)