diff --git a/index.js b/index.js index bfcf488..4382568 100644 --- a/index.js +++ b/index.js @@ -165,6 +165,10 @@ const uploadSSH = (id, token) => { reader.readAsText(file, "UTF-8"); reader.onload = function (evt) { var pubkey = evt.target.result; + pubkey = pubkey.replace(/\r\n/g, "\n"); + dbp(pubkey); + pubkey = pubkey.replace(/\n/g, ""); + dbp(pubkey); if(validatePubKey(pubkey)){ sendSSH(pubkey, id, token); }else{