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

Commit 0e5e114

Browse files
committed
Encode terminal messages before sending
1 parent 885501d commit 0e5e114

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/terminal.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ export default class Terminal {
7373
}
7474

7575
send(msg) {
76-
var preparedMessage = JSON.stringify({terminal: msg})
76+
var encoded = new Buffer(msg).toString('base64')
77+
var preparedMessage = JSON.stringify({terminal: encoded})
7778
if (this.waitForSocket != null ) {
7879
this.socket.send(preparedMessage)
7980
return

0 commit comments

Comments
 (0)