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

Disables a controversial part of #19044.

Refs #19075

(cherry picked from commit 7b841628dfd332dbd6e69a44dc1b85ec17ca5837)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgcqq7A
Service-Version: 1.23
This commit is contained in:
Dustin L. Howett 2025-07-16 21:13:12 -05:00 committed by Dustin L. Howett
parent 72cad7f3e2
commit 8673cd2abb
2 changed files with 19 additions and 3 deletions

View File

@ -483,9 +483,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

@ -197,4 +197,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>