Skip to content

Commit

Permalink
Merge pull request #2763 from threefoldtech/development_fix_bug_ssh
Browse files Browse the repository at this point in the history
Fix naming issue when importing ssh key
  • Loading branch information
AlaaElattar authored May 23, 2024
2 parents e45b0f9 + 38ed343 commit 54acee9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/playground/src/components/ssh_keys/SshFormDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,15 @@ function createNewSSHKey() {
id: keyId,
publicKey: sshKey.value,
createdAt: sshKeysManagement.formatDate(now),
name: "",
name: keyName.value,
isActive: true,
};
createdKey.value.publicKey = sshKey.value;
const parts = createdKey.value.publicKey.split(" ");
if (parts.length === 3) {
if (parts.length === 3 && keyName.value === "") {
const importedKeyName = parts[parts.length - 1];
if (importedKeyName.length < 30 && sshKeysManagement.availableName(importedKeyName)) {
keyName.value = parts[parts.length - 1];
}
Expand Down

0 comments on commit 54acee9

Please sign in to comment.