[GH-ISSUE #392] HTML for Parameters #329

Closed
opened 2026-02-28 01:24:48 +03:00 by kerem · 1 comment
Owner

Originally created by @oscarmoutinho on GitHub (Jul 25, 2017).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/392

'length' in 'WiFiManagerParameter' has 2 errors:
1- The tag has a 'length' attribute and this should be 'maxlength' (see HTTP_FORM_PARAM[]).
2- The length seems to be trimmed to only one digit (I tested with 40 and the web page shows 4)

This does not generate wrong behaviour because 'length' is ignored, but 'length' should be applied correctly.

Originally created by @oscarmoutinho on GitHub (Jul 25, 2017). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/392 'length' in 'WiFiManagerParameter' has 2 errors: 1- The <input> tag has a 'length' attribute and this should be 'maxlength' (see HTTP_FORM_PARAM[]). 2- The length seems to be trimmed to only one digit (I tested with 40 and the web page shows 4) This does not generate wrong behaviour because 'length' is ignored, but 'length' should be applied correctly.
kerem closed this issue 2026-02-28 01:24:48 +03:00
Author
Owner

@Derek123456 commented on GitHub (Aug 22, 2017):

For 2) The culprit seems to be in WiFiManager.cpp line 488
char parLength[2];
This only leaves space for 1 character for the length and 1 null terminating character.

On line 500 the length value is copied into parLength
snprintf(parLength, 2, "%d", _params[i]->getValueLength());

If you increased size of parLength[] from 2 to 5 that would allow length values up to 9999 which should be more than enough.

<!-- gh-comment-id:323897104 --> @Derek123456 commented on GitHub (Aug 22, 2017): For 2) The culprit seems to be in WiFiManager.cpp line 488 `char parLength[2];` This only leaves space for 1 character for the length and 1 null terminating character. On line 500 the length value is copied into parLength ` snprintf(parLength, 2, "%d", _params[i]->getValueLength());` If you increased size of parLength[] from 2 to 5 that would allow length values up to 9999 which should be more than enough.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#329
No description provided.