Skip to content

Tell the user when a WiFi password is too long instead of failing silently - #1325

Merged
gskjold merged 1 commit into
mainfrom
fix/wifi-password-length-feedback
Dec 4, 2026
Merged

gskjold merged 1 commit into
mainfrom
fix/wifi-password-length-feedback

Conversation

@gskjold

@gskjold gskjold commented Nov 23, 2026

Copy link
Copy Markdown
Member

Why

Since 2.6.0, /save refuses a WiFi password of 64 characters or more, because NetworkConfig.psk holds 63 characters plus the terminator. A longer password used to overflow the field. The UI ignores the reply:

  • Configuration page: it navigates back to the dashboard as if the settings were saved, but nothing is saved, including any other changes on the page.
  • Setup page: nothing happens.

A user with a 64-digit hex WPA key therefore has no idea why their settings don't stick.

Changes

  • Both WiFi password fields (sp on the setup page, wp on the configuration page) get a pattern of at most 63 characters plus a title. The browser then stops the form and says why. maxlength would instead silently cut a pasted 64-digit key to 63 characters, which gives a wrong password.
  • When /save answers success: false, both pages show the server's message in an alert and stay on the page, instead of carrying on.
  • New strings conf.connection.psk_max and conf.save_failed are added to localazy/source/en.json. They need a Localazy upload after merge.
  • ui/dist has been rebuilt.

Verification

  • npm run build, then pio run for esp8266dev, esp32dev and esp32s2dev.
  • Not tried in a browser against a device.

🤖 Generated with Claude Code

…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]>
@github-actions

Copy link
Copy Markdown

🔧 PR Build Artifacts

Version: eff5b1e

All environments built successfully. Download the zip files:

Artifacts expire after 7 days. View workflow run

@gskjold gskjold added this to the v2.6.1 milestone Nov 26, 2026
@gskjold
gskjold merged commit 9e920a9 into main Dec 4, 2026
8 checks passed
@gskjold
gskjold deleted the fix/wifi-password-length-feedback branch December 4, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant