Skip to content

Indexed DLL/EXE profile icons are rejected by media resource validation #20567

Closed

Description

@arista-ms

Windows Terminal version

1.24.11911.0

Windows build number

Microsoft Windows 11

Other Software

A PE file containing multiple icon resources, such as shell32.dll or Office's oicons.dll.

Steps to reproduce

  1. Set a profile icon to an indexed icon resource, for example:

    "icon": "C:\\Windows\\System32\\shell32.dll,210"
  2. 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.

Activity

  1. added
    Needs-Triage
    Needs-Tag-Fix
    on Aug 21, 2026
  2. added
    Issue-Bug
    Area-Settings
    Product-Terminal
    Priority-3
    and removed
    Needs-Triage
    Needs-Tag-Fix
    on Aug 26, 2026
  3. added a commit that references this issue on Sep 11, 2026
    f65148b
  4. added 2 commits that reference this issue on Sep 29, 2026
    a20795e
    1517347
  5. added a commit that references this issue on Nov 24, 2026
    d023662
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-SettingsIssue-BugNeeds-Tag-FixPriority-3Product-Terminal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions