RESOLVED INVALID 38554
[Qt] The image plugin used for decoding images should be configurable
https://bugs.webkit.org/show_bug.cgi?id=38554
Summary [Qt] The image plugin used for decoding images should be configurable
Benjamin Poulain
Reported 2010-05-04 16:29:53 PDT
Currently, all the images plugins can be used to decode images. That can be a security issue, one might want to avoid some image formats when decoding images from the Web: Tiff, SVG (see https://bugs.webkit.org/show_bug.cgi?id=37826), mng for example. We could add an API in QWebSettings to name explicitly the plugins that can be loaded: QWebSettings::disableAutoImageLoading() QWebSettings::enableImagePlugin("jpg");
Attachments
Initial implementation of configurable images loading. (8.45 KB, patch)
2011-04-14 12:52 PDT, Igor Trindade Oliveira
no flags
Igor Trindade Oliveira
Comment 1 2011-04-14 12:52:05 PDT
Created attachment 89629 [details] Initial implementation of configurable images loading. Add initial implementation of configurable images auto loading. Right now i am just handling png and jpeg and the public api will be changed.
Antonio Gomes
Comment 2 2011-04-17 22:21:38 PDT
Comment on attachment 89629 [details] Initial implementation of configurable images loading. View in context: https://bugs.webkit.org/attachment.cgi?id=89629&action=review > Source/WebCore/page/Settings.cpp:57 > + for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) > + frame->document()->cachedResourceLoader()->setLoadJPEGImage(page->settings()->loadsSiteJPEGImagesIgnoringImageLoadingSetting()); this could be called outside the loop. page->settings()->loadsSiteJPEGImagesIgnoringImageLoadingSetting() > Source/WebCore/page/Settings.cpp:63 > + for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) > + frame->document()->cachedResourceLoader()->setLoadPNGImage(page->settings()->loadsSitePNGImagesIgnoringImageLoadingSetting()); Ditto > Source/WebKit/qt/Api/qwebsettings.cpp:630 > +void QWebSettings::enableLoadingImage(const QString &image) & positioned wrong. The goal should be clean, and comments are needed. > Source/WebKit/qt/Api/qwebsettings.cpp:638 > + if (image == QLatin1String("jpeg")) > + d->settings->setLoadsSiteJPEGImagesIgnoringImageLoadingSetting(true); > + else if(image == QLatin1String("png")) > + d->settings->setLoadsSitePNGImagesIgnoringImageLoadingSetting(true); Only caring about these two formats?
Jocelyn Turcotte
Comment 3 2014-02-03 03:16:28 PST
=== Bulk closing of Qt bugs === If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary. If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.
Note You need to log in before you can comment on or make changes to this bug.