Remove initCommand from DocumentPtySession and PtyProcess#26837
Merged
Remove initCommand from DocumentPtySession and PtyProcess#26837
Conversation
gzdunek
approved these changes
May 24, 2023
ryanclark
approved these changes
May 25, 2023
|
@ravicious See the table below for backport results.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
initCommandwas our (admittedly hacky) solution to opening a shell session and executing a specific command when it starts. It has been used for two features which are no longer existing:Since it's no longer used, we can remove it. Documents are persisted to disk, so we have to be careful about modifying their fields. However, removing fields is generally safe. On top that,
initCommandwas removed from the state as soon as the tab got opened. If by any chance there's a user with a doc withinitCommandin the state (for example, we failed to spawn the PTY and they closed the app), this document will become a regular terminal tab.It doesn't get rid of the problems raised in TEL-Q322-15 (see the description of #26057), but it does get rid of an attack vector.