diff options
author | Christian Hesse <mail@eworm.de> | 2024-11-08 08:50:12 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-11-08 09:16:25 +0100 |
commit | 1f526b356121749991fee69cee5a6c728855c8f2 (patch) | |
tree | d86c358448c3d4bd04a6863c85200f6cca3c3d9b | |
parent | 0837391c38987462c3a1787143d631b92e0a0551 (diff) |
mod/ssh-keys-import: $SSHKeysImport: split with `:deserialize`routeros-7.16-3
-rw-r--r-- | mod/ssh-keys-import.rsc | 3 |
1 files changed, 1 insertions, 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; |