[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aestes at apple.com aestes at apple.com
Wed Dec 22 14:52:24 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6301a9666cace8b299c76cd8abe8ab3abd3097e1
Author: aestes at apple.com <aestes at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 22 20:55:51 2010 +0000

    WebKit shouldn't load a plug-in based on file extension if a MIME type
    is specified.
    https://bugs.webkit.org/show_bug.cgi?id=48046
    
    Reviewed by Eric Carlson.
    
    WebKit/mac:
    
    If a MIME type is specified in an object or embed element, and that MIME
    type isn't supported by an installed plug-in, WebKit shouldn't attempt
    to find a plug-in based on the file extension of the url attribute.
    Doing so can lead to cases where a plug-in is loaded that can't handle
    resources of the MIME type specified by the author.
    
    * WebCoreSupport/WebFrameLoaderClient.mm:
    (WebFrameLoaderClient::createPlugin): Only check for a pluginPackage by
    extension if MIME type is the empty string.
    
    LayoutTests:
    
    * plugins/invalid-mime-with-valid-extension-shows-missing-plugin-expected.txt: Added.
    * plugins/invalid-mime-with-valid-extension-shows-missing-plugin.html: Added.
    * plugins/resources/test.testnetscape: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70332 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 061ef68..25fb9a1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-22  Andy Estes  <aestes at apple.com>
+
+        Reviewed by Eric Carlson.
+
+        WebKit shouldn't load a plug-in based on file extension if a MIME type
+        is specified.
+        https://bugs.webkit.org/show_bug.cgi?id=48046
+
+        * plugins/invalid-mime-with-valid-extension-shows-missing-plugin-expected.txt: Added.
+        * plugins/invalid-mime-with-valid-extension-shows-missing-plugin.html: Added.
+        * plugins/resources/test.testnetscape: Added.
+
 2010-10-22  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/BugsSite/data/mail b/LayoutTests/plugins/resources/test.testnetscape
similarity index 100%
copy from BugsSite/data/mail
copy to LayoutTests/plugins/resources/test.testnetscape
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 8f1ea42..dd21c3b 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,21 @@
+2010-10-21  Andy Estes  <aestes at apple.com>
+
+        Reviewed by Eric Carlson.
+
+        WebKit shouldn't load a plug-in based on file extension if a MIME type
+        is specified.
+        https://bugs.webkit.org/show_bug.cgi?id=48046
+
+        If a MIME type is specified in an object or embed element, and that MIME
+        type isn't supported by an installed plug-in, WebKit shouldn't attempt
+        to find a plug-in based on the file extension of the url attribute.
+        Doing so can lead to cases where a plug-in is loaded that can't handle
+        resources of the MIME type specified by the author.
+
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::createPlugin): Only check for a pluginPackage by
+        extension if MIME type is the empty string.
+
 2010-10-20  Simon Fraser  <simon.fraser at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index c3fd457..af9d50d 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -1629,7 +1629,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
     }
     
     NSString *extension = [[pluginURL path] pathExtension];
-    if (!pluginPackage && [extension length] != 0) {
+    if (!pluginPackage && [extension length] && ![MIMEType length]) {
         pluginPackage = [webView _pluginForExtension:extension];
         if (pluginPackage) {
             NSString *newMIMEType = [pluginPackage MIMETypeForExtension:extension];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list