microsoft / microsoft/microsoft-ui-xaml
Bug title: Please remove the security check for the WinUI 3 Desktop open link
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
Bug title: Please remove the security check for the ```WinUI 3 Desktop``` open link
##### -------------------------------
请移除 ```WinUI 3 Desktop``` 打开链接的安全检查
-----------------------------------------
After setting the ```NavigationUri``` attribute of ```HyperlinkButton``` and ```Hyperlink``` of ```WinUI 3```, some links will be opened for security check. However, because ```WinUI 3 Desktop``` does not have ```CoreWindow```, Therefore, there is no way to pop up the security check window, and I hope that ```WinUI 3``` can remove the link security check for desktop applications in the future.
##### -------------------------------
```WinUI 3``` 的 ```HyperlinkButton``` 和 Hyperlink 设置 ```NavigationUri``` 属性后,打开部分链接会进行安全检查,但是由于 ```WinUI 3``` Desktop 没有 ```CoreWindow```,故没有办法弹出安全检查窗口,希望未来 ```WinUI 3``` 能为桌面应用移除打开链接安全检查。
-----------------------------------------
```HyperlinkButton``` calls the ```Launcher``` implementation
##### -------------------------------
```HyperlinkButton``` 调用 ```Launcher``` 的实现
https://github.com/microsoft/microsoft-ui-xaml/blob/247d04e06b711610cbaa7b6302f2f9d67779988d/src/dxaml/xcp/dxaml/lib/HyperLink_Partial.cpp#L42
-----------------------------------------
The Launcher ```TreatAsUntrusted``` is set to True
##### -------------------------------
Launcher 的 TreatAsUntrusted 被设置为 True
https://github.com/microsoft/microsoft-ui-xaml/blob/247d04e06b711610cbaa7b6302f2f9d67779988d/src/dxaml/xcp/dxaml/lib/Launcher.cpp#L151
-----------------------------------------
Security Check (安全检查)

### Steps to reproduce the bug
See description
### Expected behavior
In desktop mode, set the Launcher ```TreatAsUntrusted``` to True
##### -------------------------------
在桌面模式下,请将 Launcher 的 ```TreatAsUntrusted``` 设置为 True
### Screenshots
See description
### NuGet package version
WinUI 3 - Windows App SDK 1.6.6: 1.6.250228001
### Windows version
Windows 11 (24H2): Build 26100
### Additional context
None
Contributor guide
Research direction
Start by reading src/dxaml/xcp/dxaml/lib/HyperLink_Partial.cpp at the linked line and follow the Launcher call into src/dxaml/xcp/dxaml/lib/Launcher.cpp around line 151. Reproduce the NavigationUri behavior on WinUI 3 Desktop and determine how TreatAsUntrusted and the missing CoreWindow affect the security check. Done means the intended desktop link behavior is verified without an inaccessible security prompt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100