Closed Bug 291360 Opened 20 years ago Closed 20 years ago

File protocol with UNC path is misparsed, so that one can not open a file described by a UNC path.

Categories

(Firefox :: Shell Integration, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: cwolfshe, Assigned: bugs)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

A link posted as file:\\server\share\file.xls gets parsed by the browser as
file:///\\server\share\file.xls and will not load. Typing
file:\\server\share\file.xls directly into the location bar accesses the file as
expected. This problem exhibits itself in both Linux and Windows versions of
Firefox at least as early as 1.0 and through the latest release for Windows.
Clearly I only expect it to actually load the page using UNC path with
backslashes on a Windows system.

If the link is posted on a Wiki, as in [file:\\server\share\file.xls Click this
file], FireFox tries to load file:///\\server\share\file.xls. If it is posted in
html with href="file:\\server\share\file.xls," the browser adds
//localsystemlocation/ between file: and \\server\share\file.xls. This behavior
can be eliminated by specifying href="file:/\\server\share\file.xls," which
leads the browser to believe the link is a full pathname, but FireFox still
tries to load, then, file:///\\server\share\file.xls.

Reproducible: Always

Steps to Reproduce:
1. Create an HTML file or Wiki post with a link to file:\\server\share\file.xls
2. Load the page.
3. Click on or hover your mouse over the link to see the destination.

Actual Results:  
The link appears to be misparsed. No page attempts to load.

Expected Results:  
On a Windows system, it should access the UNC path of the file. On other
operating systems, the address should at least be parsed correctly, and then the
file should not load due to the "malformatted" path for that operating system.
Also, if you type file://///server/share/file.xls into the location bar, it
loads the file. If you post a link in the same manner, even though it shows up
as going to that location, it never attempts to load the URL.
If you look at the JS Console, you'll see a warning.  Basically, web content
(http://) is not allowed to link to local content (file://) for security reasons.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.