mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
d5a7d77f4f
For launching with an external protocol handler on Windows, we validate a uri before sending it to `ShellExecute`, by converting a string into `PIDL` using `SHParseDisplayName` and extract a string back from PIDL using `IShellFolder::GetDisplayNameOf`. The problem was that if a fragment, a string following a hash mark (#), is always dropped after this validation. This is caused by the intended design of Windows. A proposed fix is to use `CreateUri` for validation, which is used behind `IShellFolder::GetDisplayNameOf`. However, we also keep `SHParseDisplayName` because there are cases where `CreateUri` succeeds while `SHParseDisplayName` fails such as a non-existent `file:` uri and we want to keep the same validation result for those cases. Adding `CreateUri` broke MinGW build because of our toolkit issue. We use dynamic linking for MinGW build in the meantime. This patch adds a new unittest to make sure the new validation logic behaves the same as the old one except the fragment issue. Differential Revision: https://phabricator.services.mozilla.com/D42041 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
base | ||
exthandler | ||
prefetch | ||
moz.build |