nerves-hub / nerves_hub_web

Manage firmware updates for Nerves devices
https://nerves-hub.org/
Apache License 2.0
177 stars 67 forks source link

Adding an invalid signing key does not return an error #1410

Open coop opened 1 month ago

coop commented 1 month ago

https://nerveshub.com/org/my-org/settings/keys/new

Name: devkey Key: $ cat ~/Downloads/devkey.priv | pbcopy

I mistakenly copy pasted the private key into the public key box and instead of an error the UI resets to an empty form.

It would be good to show some kind of an error that an incorrect key was added.

NOTE: I saw this behaviour on the public beta of nerves cloud.

joshk commented 1 month ago

I found the error in Sentry which was caused by this.

We don't have a validation on the key length, so adding a validation is step one.

The next step might be to do some check to confirm it is a valid public key (maybe a simple format check?)