fix: edge-control register.sh: pubkey comment field corrupts key in authorized_keys (#649)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

This commit is contained in:
Claude 2026-04-11 23:11:53 +00:00
parent 4aac315119
commit 20d8877546

View file

@ -54,7 +54,7 @@ do_register() {
# Extract key type and key from pubkey (format: "ssh-ed25519 AAAAC3...")
local key_type key
key_type=$(echo "$pubkey" | awk '{print $1}')
key=$(echo "$pubkey" | awk '{$1=""; print $0}' | tr -d ' ')
key=$(echo "$pubkey" | awk '{print $2}')
if [ -z "$key_type" ] || [ -z "$key" ]; then
echo '{"error":"invalid pubkey format"}'