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

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

Original Pull Request: https://github.com/microsoft/terminal/pull/14993

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/microsoft/terminal/pull/14993 **State:** closed **Merged:** Yes --- 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_
claunia added the pull-request label 2026-01-31 09:40:11 +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#30337