You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Indexed DLL/EXE profile icons are rejected by media resource validation #20567
Area-SettingsIssues related to settings and customizability, for console or terminalIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-3A description (P3)Product-TerminalThe new Windows Terminal.
A PE file containing multiple icon resources, such as shell32.dll or Office's oicons.dll.
Steps to reproduce
Set a profile icon to an indexed icon resource, for example:
"icon": "C:\\Windows\\System32\\shell32.dll,210"
Reload Windows Terminal.
Paths containing commas also demonstrate a second parsing problem, for example:
"icon": "C:\\icons,custom\\icons.dll,24"
or
"icon": "C:\\icons\\custom,icons.dll,24"
Expected Behavior
The selected icon resource is displayed. This syntax was added by #14107 / #1504.
Actual Behavior
The profile falls back to its default icon.
Root cause
tl;dr: We should split on the last comma.
The media-resource validation introduced by #19143 validates the complete string, including the ,index suffix, with std::filesystem::exists. Since a file named shell32.dll,210 does not exist, the resource is rejected before IconPathConverter can parse it.
Additionally, both the validator and IconPathConverter split on the first comma, so otherwise-valid paths containing a comma are parsed incorrectly.
I intend to submit a fix that validates the binary path while preserving the signed index, changes both parsers to split on the final comma, and adds regression coverage for absolute, relative, environment-expanded, malformed, non-icon, comma-folder, and comma-filename cases. The full Debug x64 build and targeted Settings Model test pass locally.
Area-SettingsIssues related to settings and customizability, for console or terminalIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-3A description (P3)Product-TerminalThe new Windows Terminal.
Activity
Fix indexed icon media resource resolution (#20572)
Fix indexed icon media resource resolution (#20572)
Fix indexed icon media resource resolution (#20572)
Squashed commit of the following: