diff --git a/intl/strres/nsStringBundle.cpp b/intl/strres/nsStringBundle.cpp index 3d8c1ff33ac..bf3d7e2a443 100644 --- a/intl/strres/nsStringBundle.cpp +++ b/intl/strres/nsStringBundle.cpp @@ -69,6 +69,15 @@ nsStringBundle::LoadProperties() rv = NS_NewURI(getter_AddRefs(uri), mPropertiesURL); if (NS_FAILED(rv)) return rv; + // whitelist check for local schemes + nsCString scheme; + uri->GetScheme(scheme); + if (!scheme.EqualsLiteral("chrome") && !scheme.EqualsLiteral("jar") && + !scheme.EqualsLiteral("resource") && !scheme.EqualsLiteral("file") && + !scheme.EqualsLiteral("data")) { + return NS_ERROR_ABORT; + } + nsCOMPtr channel; rv = NS_NewChannel(getter_AddRefs(channel), uri,