From 1f526b356121749991fee69cee5a6c728855c8f2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 8 Nov 2024 08:50:12 +0100 Subject: mod/ssh-keys-import: $SSHKeysImport: split with `:deserialize` --- mod/ssh-keys-import.rsc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mod/ssh-keys-import.rsc b/mod/ssh-keys-import.rsc index f67c0fc..d6b3b3f 100644 --- a/mod/ssh-keys-import.rsc +++ b/mod/ssh-keys-import.rsc @@ -16,7 +16,6 @@ :local Key [ :tostr $1 ]; :local User [ :tostr $2 ]; - :global CharacterReplace; :global GetRandom20CharAlNum; :global LogPrint; :global MkDir; @@ -32,7 +31,7 @@ :return false; } - :local KeyVal [ :toarray [ $CharacterReplace $Key " " "," ] ]; + :local KeyVal ([ :deserialize $Key delimiter=" " from=dsv options=dsv.plain ]->0); :if (!($KeyVal->0 = "ssh-ed25519" || $KeyVal->0 = "ssh-rsa")) do={ $LogPrint warning $0 ("SSH key of type '" . $KeyVal->0 . "' is not supported."); :return false; -- cgit v1.2.3-70-g09d2