file: URLs on UNC shares are not supported #22826

Open
opened 2026-01-31 08:24:37 +00:00 by claunia · 4 comments
Owner

Originally created by @shauniv on GitHub (Jan 31, 2025).

Windows Terminal version

1.21.3231.0

Windows build number

10.0.26100.2894

Other Software

No response

Steps to reproduce

  1. Output a formatted file URL for a file stored on a UNC network share. e.g. file://qnap-fs/dvd/test.txt
  2. Note that there is an underline beneath the URL when you mouse hovers over it
  3. Ctrl+Left mouse click the URL

Expected Behavior

  1. The associated program runs with the file as an argument, or the Open With dialog pops up

Actual Behavior

  1. An unhelpful error message appears:

Image

  1. Sometimes the mouse pointer disappears, and the "Cancel" button doesn't appear to be keyboard accessible, making it hard to dismiss this dialog.
Originally created by @shauniv on GitHub (Jan 31, 2025). ### Windows Terminal version 1.21.3231.0 ### Windows build number 10.0.26100.2894 ### Other Software _No response_ ### Steps to reproduce 1. Output a formatted file URL for a file stored on a UNC network share. e.g. file://qnap-fs/dvd/test.txt 2. Note that there is an underline beneath the URL when you mouse hovers over it 3. Ctrl+Left mouse click the URL ### Expected Behavior 1. The associated program runs with the file as an argument, or the Open With dialog pops up ### Actual Behavior 1. An unhelpful error message appears: ![Image](https://github.com/user-attachments/assets/b9e9f2e2-938a-438f-90ec-56592f3cce8c) 2. Sometimes the mouse pointer disappears, and the "Cancel" button doesn't appear to be keyboard accessible, making it hard to dismiss this dialog.
Author
Owner

@shauniv commented on GitHub (Feb 2, 2025):

Also, System.Diagnostics.Process.Start() works just fine on such UNC URLs.

@shauniv commented on GitHub (Feb 2, 2025): Also, System.Diagnostics.Process.Start() works just fine on such UNC URLs.
Author
Owner

@DHowett commented on GitHub (Apr 9, 2025):

You know, this is a weird one.

I recall writing this in #10188:

So this one is pretty curious. File URIs to UNC paths are poorly-specified. Terminals are recommended to reject file URIs that don't point back to the local host

I was trying to figure out where I got the recommendation from, and I couldn't find it. The closest I could come up with was https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#file-uris-and-the-hostname.

We may want to reevaluate our position here...

@DHowett commented on GitHub (Apr 9, 2025): You know, this is a weird one. I recall writing this in #10188: > So this one is pretty curious. File URIs to UNC paths are poorly-specified. Terminals are recommended to reject file URIs that don't point back to the local host I was trying to figure out where I got the _recommendation_ from, and I couldn't find it. The closest I could come up with was https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#file-uris-and-the-hostname. We may want to reevaluate our position here...
Author
Owner

@zadjii-msft commented on GitHub (Apr 9, 2025):

There was also long discussion around here: https://github.com/microsoft/terminal/pull/7668#issuecomment-695369748

@zadjii-msft commented on GitHub (Apr 9, 2025): There was also long discussion around here: https://github.com/microsoft/terminal/pull/7668#issuecomment-695369748
Author
Owner

@shauniv commented on GitHub (Apr 11, 2025):

Regardless of whether or not you decide to support UNC paths, there are two other serious bugs here.

  1. The message box is not keyboard accessible.
  2. Worse - if you tap the cancel button on the keyboard, the mouse pointer is hidden, and you have to hunt around for the cancel button on the dialog by watching for a mouseover effect. This should be a P1 bug.

There is another bug, unrelated to these issues, that URL detection breaks on parentheses, which are legal in URIs. Should I open another bug for this?

https://github.com/user-attachments/assets/03250437-dd22-4048-9fd7-623aa7a6af5e

@shauniv commented on GitHub (Apr 11, 2025): Regardless of whether or not you decide to support UNC paths, there are two other serious bugs here. 1. The message box is not keyboard accessible. 2. **Worse** - if you tap the cancel button on the keyboard, the mouse pointer is hidden, and you have to hunt around for the cancel button on the dialog by watching for a mouseover effect. **This should be a P1 bug.** There is another bug, unrelated to these issues, that URL detection breaks on parentheses, which are legal in URIs. Should I open another bug for this? https://github.com/user-attachments/assets/03250437-dd22-4048-9fd7-623aa7a6af5e
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22826