morassman / atom-commander

Dual-pane file manager for Atom.
MIT License
33 stars 5 forks source link

Uncaught InvalidAsn1Error: Expected 0x2: got 0xbf #64

Closed kikoking1 closed 7 years ago

kikoking1 commented 7 years ago

[Enter steps to reproduce:]

  1. create a public ssh key
  2. try connecting using public ssh and passphrase

Atom: 1.14.4 x64 Electron: 1.3.13 OS: Mac OS X 10.12.3 Thrown From: atom-commander package 0.8.7

Stack Trace

Uncaught InvalidAsn1Error: Expected 0x2: got 0xbf

At /Users/Kiko/.atom/packages/atom-commander/node_modules/asn1/lib/ber/reader.js:229

InvalidAsn1Error: Expected 0x2: got 0xbf
    at newInvalidAsn1Error (/packages/atom-commander/node_modules/asn1/lib/ber/errors.js:7:13)
    at Reader._readTag (/packages/atom-commander/node_modules/asn1/lib/ber/reader.js:229:11)
    at Reader.readInt (/packages/atom-commander/node_modules/asn1/lib/ber/reader.js:145:15)
    at genPublicKey (/packages/atom-commander/node_modules/ssh2-streams/lib/utils.js:437:19)
    at Client.connect (/packages/atom-commander/node_modules/ssh2/lib/client.js:234:29)
    at SFTPSession.module.exports.SFTPSession.connectWith (/packages/atom-commander/lib/fs/ftp/sftp-session.coffee:137:11)
    at SFTPSession.module.exports.SFTPSession.connectWithPassphrase (/packages/atom-commander/lib/fs/ftp/sftp-session.coffee:74:6)
    at InputDialog.callback (/packages/atom-commander/lib/fs/ftp/sftp-session.coffee:59:12)
    at InputDialog.module.exports.InputDialog.confirm (/packages/atom-commander/lib/dialogs/input-dialog.coffee:52:6)
    at /packages/atom-commander/lib/dialogs/input-dialog.coffee:27:70)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

     -0:10.5.0 atom-commander:open-server (td..directory.icon.icon-file-directory)
     -0:06.6.0 core:paste (input.hidden-input)
     -0:06.3.0 core:confirm (input.hidden-input)

Non-Core Packages

atom-commander 0.8.7 
morassman commented 7 years ago

I improved the SFTP connection handling and also how passwords, passphrases and SSH keys are handled in v0.8.8. The changes may address this issue as well.