Repository navigation
fix(mail): say so when the password saved for Gmail is not an app password - #72
Merged
Merged
Conversation
…sword Settings showed a tick for any saved password of eight characters or more. With a Gmail address that misleads: Gmail accepts only a 16-letter app password over IMAP, so someone who pastes their normal Google password sees saved, the poll fails quietly, and the alerts never come with nothing to say why. passwordAdvice in mail.js looks at the saved length and whether the account resolves to imap.gmail.com. Settings then shows the length next to the field and, when the password is saved, a sentence on what that usually means and where to make an app password. It is worded as likely, since a work or school account can be set up differently by its admin. Only the length is used. The password is not compared, logged or sent anywhere, and nothing new leaves the main process beyond one word of advice on the existing Settings channel.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
CI for f47e157: all jobs passed
Tests: 518 passed, 0 failed, 0 skipped, 518 total. This comment updates itself on every push. Full run. |
This branch was successfully deployed
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.
What this fixes
Settings > Feeds showed saved with a tick for any mail password of eight characters or more. With a Gmail address that is misleading. Gmail accepts only a 16-letter app password over IMAP, so someone who pastes their normal Google password sees a tick, the poll fails quietly, and the alerts never come with nothing to explain why.
Now, when the account resolves to
imap.gmail.comand the saved password is not 16 characters:saved, but 19 characters, not 16How
passwordAdvice(len, email, host)insrc/mail.jsis pure and tested. It reusesimapHostFor, so a@googlemail.comaddress or a mistypedwww.gmail.comhost is still recognised.email:passwordInfonow hands main the config, since the advice depends on the address and the server.Known limits (from review, not fixed here)
passwordAdviceitself has a real unit test;passwordInfo(cfg)end to end would need Electron mocked.Test plan
npm test: 514 pass, 0 fail, 4 skipped (POSIX only)npx eslint .clean