[PR #14993] [MERGED] Allow wsl$ in file URIs; generally allow all URI schemes #30332

Open
opened 2026-01-31 09:40:10 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14993
Author: @zadjii-msft
Created: 3/14/2023
Status: Merged
Merged: 3/17/2023
Merged by: @carlos-zamora

Base: mainHead: dev/migrie/b/allow-all-the-uris


📝 Commits (1)

  • be62c22 Allow WSL$ in file:// URIs, and generally allow all URI schemes

📊 Changes

1 file changed (+14 additions, -1 deletions)

View changed files

📝 src/cascadia/TerminalApp/TerminalPage.cpp (+14 -1)

📄 Description

Does two things related to URLs emitted via OSC8.

  • Allows wsl$ and wsl.localhost as the hostname in file:// URIs
  • Generally allows all URIs that parse as a URI.

The relevant security comments: https://github.com/microsoft/terminal/pull/7526#issuecomment-764160208

this doesn't let a would-be attacker specify command-line arguments (ala "cmd.exe /s /c do_a_bad_thing") (using somebody else's reputation to cause mayhem)

ShellExecute de-elevates because it bounces a launch request off the shell

"Works predictably for 15% of applications" (h/t to PhMajerus' AXSH, and other on-Windows requestors) is better in so many ways than "Works for 0% of applications", in my estimation. Incremental progress 😄 while we work on features that'll make it even more broadly applicable.

Closes #10188
Closes #7562

discuss


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/14993 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 3/14/2023 **Status:** ✅ Merged **Merged:** 3/17/2023 **Merged by:** [@carlos-zamora](https://github.com/carlos-zamora) **Base:** `main` ← **Head:** `dev/migrie/b/allow-all-the-uris` --- ### 📝 Commits (1) - [`be62c22`](https://github.com/microsoft/terminal/commit/be62c22113805a8423df1c099be2052049e83f3e) Allow WSL$ in file:// URIs, and generally allow all URI schemes ### 📊 Changes **1 file changed** (+14 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+14 -1) </details> ### 📄 Description Does two things related to URLs emitted via OSC8. * Allows `wsl$` and `wsl.localhost` as the hostname in `file://` URIs * Generally allows _all_ URIs that parse as a URI. The relevant security comments: https://github.com/microsoft/terminal/pull/7526#issuecomment-764160208 > this doesn't let a would-be attacker specify command-line arguments (ala "cmd.exe /s /c do_a_bad_thing") (using somebody else's reputation to cause mayhem) > > `ShellExecute` de-elevates because it bounces a launch request off the shell > > "Works predictably for 15% of applications" (h/t to PhMajerus' AXSH, and other on-Windows requestors) is better in so many ways than "Works for 0% of applications", in my estimation. Incremental progress :smile: while we work on features that'll make it even more broadly applicable. Closes #10188 Closes #7562 _discuss_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:40:10 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30332