Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Encode terminal messages before sending
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotdrew committed Jun 29, 2017
1 parent 885501d commit 0e5e114
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export default class Terminal {
}

send(msg) {
var preparedMessage = JSON.stringify({terminal: msg})
var encoded = new Buffer(msg).toString('base64')
var preparedMessage = JSON.stringify({terminal: encoded})
if (this.waitForSocket != null ) {
this.socket.send(preparedMessage)
return
Expand Down

0 comments on commit 0e5e114

Please sign in to comment.