Bug 1180460 - don't allow alternate URI changes inside view-source URI fixup, r=bz

This commit is contained in:
Gijs Kruitbosch 2015-07-07 11:26:15 +01:00
parent 6b04c1a53e
commit eece5b4ad3

View File

@ -160,7 +160,10 @@ nsDefaultURIFixup::GetFixupURIInfo(const nsACString& aStringURI,
if (scheme.LowerCaseEqualsLiteral("view-source")) {
nsCOMPtr<nsIURIFixupInfo> uriInfo;
uint32_t newFixupFlags = aFixupFlags & ~FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP;
// We disable keyword lookup and alternate URIs so that small typos don't
// cause us to look at very different domains
uint32_t newFixupFlags = aFixupFlags & ~FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP
& ~FIXUP_FLAGS_MAKE_ALTERNATE_URI;
rv = GetFixupURIInfo(Substring(uriString,
sizeof("view-source:") - 1,