Repository navigation
Tell the user when a WiFi password is too long instead of failing silently - #1325
Merged
Merged
Conversation
…ently Since 2.6.0 the device refuses a WiFi password longer than the 63 characters NetworkConfig can hold, but neither the setup nor the configuration page showed the reply: the configuration page went back to the dashboard as if the settings were saved, and nothing was saved. - Limit the WiFi password fields to 63 characters with a pattern, so the browser stops the form and says why. maxlength would silently cut a pasted 64 digit key instead. - Show the server's message and stay on the page when a save fails. Co-Authored-By: Claude Opus 5.5 <[email protected]>
🔧 PR Build ArtifactsVersion: All environments built successfully. Download the zip files:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Since 2.6.0,
/saverefuses a WiFi password of 64 characters or more, becauseNetworkConfig.pskholds 63 characters plus the terminator. A longer password used to overflow the field. The UI ignores the reply:A user with a 64-digit hex WPA key therefore has no idea why their settings don't stick.
Changes
spon the setup page,wpon the configuration page) get a pattern of at most 63 characters plus a title. The browser then stops the form and says why.maxlengthwould instead silently cut a pasted 64-digit key to 63 characters, which gives a wrong password./saveanswerssuccess: false, both pages show the server's message in an alert and stay on the page, instead of carrying on.conf.connection.psk_maxandconf.save_failedare added tolocalazy/source/en.json. They need a Localazy upload after merge.ui/disthas been rebuilt.Verification
npm run build, thenpio runfor esp8266dev, esp32dev and esp32s2dev.🤖 Generated with Claude Code