Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,14 @@ static bool _validateSingleMediaResource(std::wstring_view resource)
return false;
}

const auto scheme{ resourceUri.SchemeName() };
// Only file: URIs and ms-* URIs are permissible. http, https, ftp, gopher, etc. are not.
return til::equals_insensitive_ascii(scheme, L"file") || til::starts_with_insensitive_ascii(scheme, L"ms-");
if constexpr (Feature_DisableWebSourceIcons::IsEnabled())
{
const auto scheme{ resourceUri.SchemeName() };
// Only file: URIs and ms-* URIs are permissible. http, https, ftp, gopher, etc. are not.
return til::equals_insensitive_ascii(scheme, L"file") || til::starts_with_insensitive_ascii(scheme, L"ms-");
}

return true;
}
catch (...)
{
Expand Down
11 changes: 11 additions & 0 deletions src/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,15 @@
<alwaysDisabledReleaseTokens/>
</feature>

<feature>
<name>Feature_DisableWebSourceIcons</name>
<description>Disables icon paths that make web requests</description>
<id>19075</id>
<stage>AlwaysDisabled</stage>
<alwaysEnabledBrandingTokens>
<brandingToken>Dev</brandingToken>
<brandingToken>Canary</brandingToken>
</alwaysEnabledBrandingTokens>
</feature>

</featureStaging>
Loading