Browsers do not generally allow web pages to interact with client-side file system as a security measure. I would like to know what can go wrong with the following scenario:
Clicking a special hyperlink in a browser opens a link specified folder in windows file explorer.
Steps to achieve this:
- A Protocol handler application is installed on browser machines.
- It registers itself for
nfx:protocol, (similar to mail clients, which register
- When a User clicks a hyperlink with an
- The Protocol Handler application is launched with the above URL as a process argument by the browser.
/are converted to Path Separator (for e.g
nfx:is removed from the start of the URL. And the result
\\machinename\share\folder\is checked if directory exists.
- If it exists, the user is asked to confirm whether they want to open this folder If the user confirms then
explorer.exeis launched with
- Protocol launcher application exits.
Why was this done (In case this a XY problem):
- I have a requirement where regularly updated installers are kept on a network path.
- A webpage will list all the available installers.
- Clicking on the link should take the user to Installer location.
- We are not expected to download, or directly launch the installer from the webpage. The user can decide if he wants to run the installer once the folder is opened in windows explorer.
How dangerous will opening a network folder or local folder like this be?