Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display attempts left in keyring passphrase prompt #12455

Closed
wants to merge 1 commit into from

Conversation

snipeTR
Copy link

@snipeTR snipeTR commented Jul 5, 2022

to show how many attempts are left.
sample
[ 3 / 2 ]Enter keyring passphrase:

to show how many attempts are left.
sample
[ 3 / 2 ]Enter keyring passphrase:
@snipeTR snipeTR requested a review from a team as a code owner July 5, 2022 16:01
@@ -708,7 +708,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) {
}

buf := bufio.NewReader(buf)
pass, err := input.GetPassword("Enter keyring passphrase:", buf)
pass, err := input.GetPassword("[", maxPassphraseEntryAttempts ,"/", failureCounter ,"]Enter keyring passphrase:", buf)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct. Should be something like:

fmt.Sprintf("Enter keyring passphrase (attempt %d/%d):", failureCounter, maxPassphraseEntryAttempts)

@julienrbrt julienrbrt changed the title line 711 feat: display attempts left in keyring passphrase prompt Jul 5, 2022
@amaury1093
Copy link
Contributor

let's also add a changelog entry here

@amaury1093 amaury1093 self-assigned this Jul 13, 2022
@amaury1093
Copy link
Contributor

Hey @snipeTR any updates on this PR?

@tac0turtle
Copy link
Member

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.

4 participants