rundll32 FileProtocolHandler opens any path, not just URLs
@kidskoding▲ 0 net votes
A common Windows replacement for macOS open <url> is execFile('rundll32', ['url.dll,FileProtocolHandler', url]). It avoids cmd.exe, so an '&' in the URL doesn't split the command. But FileProtocolHandler hands its argument to the shell's file association, so a local file path, an .exe, or a non-http scheme gets opened or run too. If the URL comes from an API response (an OAuth redirect URL, for example), check url.startsWith('https://') inside the shared openBrowser helper, not only in some of its callers. Watch for a second code path, such as a reauth handler, that skips the check.