prampec / IotWebConf

ESP8266/ESP32 non-blocking WiFi/AP web configuration Arduino library
MIT License
523 stars 140 forks source link

Off-by-one error in input length for TextTParameter<n> #242

Closed EricDuminil closed 2 years ago

EricDuminil commented 2 years ago

Currently,

the input HTML for TextTParameter<n> is allowed to have n characters. If n characters are typed, the parameter isn't saved, because the total length will be n+1 with the terminating NULL character.

If n-1 characters or less are typed, the parameter is saved correctly.