UI does not show SSH Pubkey Comment with Spaces

Bug #2064920 reported by DB
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Medium
Unassigned
maas-ui
Fix Committed
Medium
Peter Makowski

Bug Description

# Bug summary

When adding an SSH Pubkey in the web UI (at `.../r/account/prefs/ssh-keys`) the comment of the Pubkey is only shown in the UI, when it does not contain spaces. Otherwise the first few characters of the key material are shown. The first few characters are often the same between different keys, making it impossible to distinguish them in the web UI. The last bit is related to: #1994943.

# Version and build

3.4.1

# Interface used

Web interface.

# What happened

When a key is added with no spaces in the comment, the UI works as expected. When the comment contains a space, the comment is not shown, instead the start of the key material is shown. See screenshot for an example of both behaviors.

# Steps to reproduce

I added the following two newly generated keys using the "Source: Upload" in the web interface:

```
$ ssh-keygen -t ed25519 -f ~/.ssh/test1 -C "test_nospace"
$ ssh-keygen -t ed25519 -f ~/.ssh/test2 -C "test with space"
$ cat ~/.ssh/test1.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM8lzUoxsq0Vlg1YBryNMPT0o9QwD9/LhvP9+zPOgK29 test_nospace
$ cat ~/.ssh/test2.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICCM6h+Y4UU/c8Qr3auS6tLFNsVMMe/+hJMDdn44HknI test with space
```

Revision history for this message
DB (dbxyz) wrote :
description: updated
Revision history for this message
Anton Troyanov (troyanov) wrote :

Hi dbxyz and thanks for reporting this bug.

Confirmed in 3.5 RC3 as well

Changed in maas-ui:
status: New → Triaged
Changed in maas:
status: New → Triaged
Changed in maas-ui:
importance: Undecided → Medium
Changed in maas:
importance: Undecided → Medium
milestone: none → 3.6.0
Changed in maas-ui:
milestone: none → 3.6.0
Revision history for this message
Peter Makowski (petermakowski) wrote :
Changed in maas-ui:
assignee: nobody → Peter Makowski (petermakowski)
status: Triaged → In Progress
Changed in maas-ui:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.