diff --git a/kinode/src/register-ui/src/pages/ImportKeyfile.tsx b/kinode/src/register-ui/src/pages/ImportKeyfile.tsx index 4f39dce4..79b2491f 100644 --- a/kinode/src/register-ui/src/pages/ImportKeyfile.tsx +++ b/kinode/src/register-ui/src/pages/ImportKeyfile.tsx @@ -62,7 +62,7 @@ function ImportKeyfile({ credentials: 'include', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ - keyfile: Buffer.from(localKey).toString('base64'), + keyfile: Buffer.from(localKey).toString('utf8'), password_hash: hashed_password, }), }); diff --git a/kinode/src/register.rs b/kinode/src/register.rs index 4db4d54a..782b5e09 100644 --- a/kinode/src/register.rs +++ b/kinode/src/register.rs @@ -443,6 +443,7 @@ async fn handle_import_keyfile( sender: Arc, provider: Arc>, ) -> Result { + println!("received base64 keyfile: {}\r", info.keyfile); // if keyfile was not present in node and is present from user upload let encoded_keyfile = match base64_standard.decode(info.keyfile) { Ok(k) => k, @@ -455,6 +456,10 @@ async fn handle_import_keyfile( } }; + println!( + "received keyfile: {}\r", + String::from_utf8_lossy(&encoded_keyfile) + ); let (decoded_keyfile, mut our) = match keygen::decode_keyfile(&encoded_keyfile, &info.password_hash) { Ok(k) => {