setup: Make the check more resilient

ed25519 keys start with the ssh-ed25519 prefix. Okay, this mechanism
sucks. I should just figure out how to parse the keys.

Related to #516
This commit is contained in:
Vishesh Handa
2021-06-19 15:31:04 +02:00
parent 1b23cb4da9
commit da8c7e51c5

View File

@ -24,7 +24,7 @@ class PublicKeyEditor extends StatelessWidget {
}
val = val.trim();
if (!val.startsWith("ssh-rsa ") && !val.startsWith("ecdsa-sha2")) {
if (!val.startsWith("ssh-") && !val.startsWith("ecdsa-")) {
return tr("setup.keyEditors.public");
}
return null;