Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Copy/paste issue in Teleport Web Console #92

Closed
travelton opened this issue May 13, 2020 · 2 comments · Fixed by #95
Closed

Copy/paste issue in Teleport Web Console #92

travelton opened this issue May 13, 2020 · 2 comments · Fixed by #95
Assignees

Comments

@travelton
Copy link

Issue:

When using the Teleport Web Console, and attempting to copy/paste a string that exceeds the length of the console window, xterm.js inserts a line break between the wrapped lines. This breaks any output that may be a URL. You need to copy and paste the output in to a text editor, remove the line breaks, then copy/paste in your browser. This issue does not occur on a native terminal.

Repro Steps:

$ echo 'http://www.google.com/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' > test.txt

$ cat test.txt
http://www.google.com/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaa

Potential Fix:

This issue was fixed in xterm.js v2.8.0 via xtermjs/xterm.js#693. It appears we are currently on version v2.4.0.

@benarent
Copy link
Contributor

It looks like X-Term has improved a lot since the 2.x times, with current being 4.x. Any reason to not just bump version? We should at least consider upgrading to 2.9.2 for extra bug fixes.

@alex-kovoy
Copy link
Contributor

alex-kovoy commented Jun 2, 2020

@benarent, newer versions have some API changes which need to be addressed on our side.
For example, newly versions have some issues when unwinding the session in the player. But I agree that it's about time to update it. If anything, we can use 2 versions: one for session player and another for active sessions.

As for this bug fix, we can do the following:

  1. Use our fork and create a branch 2.8.0 (similarly to 2.4.0).
  2. Backport this commit with security fixes to this new branch. (do not backport the dist and map files, only the parser.ts change. We need to rebuild the terminal to re-generate /dist files)
  3. Update xterm dependency in our package.json (teleport/gravity)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants