Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a crash when duplicating tabs with elevate:true #15548

Merged

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Jun 14, 2023

When elevate is set to true, _maybeElevate would try to
modify newTerminalArgs and crash, because during tab duplication
there aren't any newTerminalArgs. This issue may happen for instance
when receiving hand-off from a non-elevated client and then trying
to duplicate that tab.

Closes #15534

Validation Steps Performed

  • Launch with "elevate": false
  • Set "elevate": true
  • Duplicate a tab
  • Doesn't crash ✅

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-User Interface Issues pertaining to the user interface of the Console or Terminal Priority-1 A description (P1) Product-Terminal The new Windows Terminal. labels Jun 14, 2023
@lhecker lhecker added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jun 15, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot deleted the dev/lhecker/15534-elevate-crash-fix branch June 15, 2023 14:43
DHowett pushed a commit that referenced this pull request Jul 27, 2023
When `elevate` is set to `true`, `_maybeElevate` would try to
modify `newTerminalArgs` and crash, because during tab duplication
there aren't any `newTerminalArgs`. This issue may happen for instance
when receiving hand-off from a non-elevated client and then trying
to duplicate that tab.

Closes #15534

## Validation Steps Performed
* Launch with `"elevate": false`
* Set `"elevate": true`
* Duplicate a tab
* Doesn't crash ✅

(cherry picked from commit 427b37c)
Service-Card-Id: 89534065
Service-Version: 1.18
DHowett pushed a commit that referenced this pull request Aug 2, 2023
When `elevate` is set to `true`, `_maybeElevate` would try to
modify `newTerminalArgs` and crash, because during tab duplication
there aren't any `newTerminalArgs`. This issue may happen for instance
when receiving hand-off from a non-elevated client and then trying
to duplicate that tab.

Closes #15534

* Launch with `"elevate": false`
* Set `"elevate": true`
* Duplicate a tab
* Doesn't crash ✅

(cherry picked from commit 427b37c)
Service-Card-Id: 89534064
Service-Version: 1.17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal.
Projects
Development

Successfully merging this pull request may close these issues.

Terminal crashes while duplicating powershell tab
3 participants