Re-enable web-source icons in Stable and Preview builds (#19137)

Disables a controversial part of #19044.

Refs #19075
This commit is contained in:
Dustin L. Howett 2025-07-16 21:13:12 -05:00 committed by GitHub
parent 5b63e24c73
commit 7b841628df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 3 deletions

View File

@ -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 (...)
{

View File

@ -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>