Skip to content

refactor(client): check name validation for keys add|import|rename (backport #18950)#24152

Merged
aljo242 merged 7 commits into
release/v0.53.xfrom
mergify/bp/release/v0.53.x/pr-18950
Mar 27, 2025
Merged

refactor(client): check name validation for keys add|import|rename (backport #18950)#24152
aljo242 merged 7 commits into
release/v0.53.xfrom
mergify/bp/release/v0.53.x/pr-18950

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Mar 26, 2025

Motivation

When I set the $name variable by mistake, and after running keys add $name command, it created a key with the empty name.

This looks odd when I ran keys list to check the created key, see the screenshot below. I'm confused about the name, is it empty or just the "" itself.
image

Also, an unnormal name isn't friendly to keys delete, keys show, and keys export subcommand.

So I think we should prevent from creating a key with an unnormal name


This is an automatic backport of pull request #18950 done by [Mergify](https://mergify.com).

…18950)

(cherry picked from commit c307001)

# Conflicts:
#	CHANGELOG.md
#	client/keys/import.go
@mergify mergify Bot requested a review from a team March 26, 2025 21:09
@mergify mergify Bot added the conflicts label Mar 26, 2025
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented Mar 26, 2025

Cherry-pick of c307001 has failed:

On branch mergify/bp/release/v0.53.x/pr-18950
Your branch is up to date with 'origin/release/v0.53.x'.

You are currently cherry-picking commit c30700134.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   client/keys/add.go
	modified:   client/keys/add_test.go
	modified:   client/keys/import_test.go
	modified:   client/keys/rename.go
	modified:   client/keys/rename_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   client/keys/import.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@aljo242 aljo242 requested a review from technicallyty March 26, 2025 22:12
@aljo242 aljo242 added this pull request to the merge queue Mar 27, 2025
Merged via the queue into release/v0.53.x with commit 193a739 Mar 27, 2025
@aljo242 aljo242 deleted the mergify/bp/release/v0.53.x/pr-18950 branch March 27, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C:CLI C:Keys Keybase, KMS and HSMs conflicts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants