sapcc / elektra

An opinionated openstack Web UI for consumer self service and operations.
Apache License 2.0
74 stars 29 forks source link

Keypairs with a space in the name cause elektra to crash #1369

Closed SuperSandro2000 closed 3 months ago

SuperSandro2000 commented 3 months ago

I've uploaded a keypair to the cloud via openstack keypair create "Sandro WSL SAP" --public-key ~/.ssh/id_ed25519.pub. When I want to view that key, I get the following "500"

image

edda commented 3 months ago

This error message indicates that it's a 500 in the backend service, not in Elektra. What happens when you try to view the keypair using the OpenStack CLI?

SuperSandro2000 commented 3 months ago

That works as expected:

 ▶ openstack keypair list
+----------------+-------------------------------------------------+------+
| Name           | Fingerprint                                     | Type |
+----------------+-------------------------------------------------+------+
| Sandro XXX XXX | xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx | ssh  |
+----------------+-------------------------------------------------+------+

 ▶ openstack keypair show "Sandro XXX XXX"
+-------------+------------------------------------------------------------------+
| Field       | Value                                                            |
+-------------+------------------------------------------------------------------+
| created_at  | 2024-06-17T11:22:33.000000                                       |
| fingerprint | xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx                  |
| id          | Sandro XXX XXX                                                   |
| is_deleted  | False                                                            |
| name        | Sandro XXX XXX                                                   |
| private_key | None                                                             |
| type        | ssh                                                              |
| user_id     | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
+-------------+------------------------------------------------------------------+
hgw77 commented 3 months ago

this issue is also related to #176

hgw77 commented 3 months ago

this should be fixed with #1382