From d86f2d454fb022cddd7d7ccf37ea81ca75c21098 Mon Sep 17 00:00:00 2001 From: "cbiesinger%gmx.at" Date: Mon, 6 Aug 2007 18:02:14 +0000 Subject: [PATCH] 364235 don't instantiate plugins for URLs with unknown schemes unless we also have a type specified r+sr=bz git-svn-id: svn://10.0.0.236/trunk@231539 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsObjectLoadingContent.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mozilla/content/base/src/nsObjectLoadingContent.cpp b/mozilla/content/base/src/nsObjectLoadingContent.cpp index f1346305500..9e7f8eb168f 100644 --- a/mozilla/content/base/src/nsObjectLoadingContent.cpp +++ b/mozilla/content/base/src/nsObjectLoadingContent.cpp @@ -314,6 +314,9 @@ IsPluginEnabledByExtension(nsIURI* uri, nsCString& mimeType) nsCAutoString ext; GetExtensionFromURI(uri, ext); + if (ext.IsEmpty()) + return PR_FALSE; + nsCOMPtr host(do_GetService("@mozilla.org/plugin/host;1")); const char* typeFromExt; if (host && @@ -1053,6 +1056,10 @@ nsObjectLoadingContent::LoadObject(nsIURI* aURI, if (!CanHandleURI(aURI)) { LOG(("OBJLC [%p]: can't handle URI\n", this)); + if (aTypeHint.IsEmpty()) { + rv = NS_ERROR_NOT_AVAILABLE; + return NS_OK; + } // E.g. mms:// mType = eType_Plugin; if (aNotify)