⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 264154 in webkit


Ignore:
Timestamp:
Jul 9, 2020, 12:01:16 AM (6 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r258741 - Sanitize suggested download filename received from web process
​https://bugs.webkit.org/show_bug.cgi?id=209300
<rdar://problem/59487723>

Patch by Alex Christensen <​achristensen@webkit.org> on 2020-03-19
Reviewed by Chris Dumez.

Source/WebKit:

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):

LayoutTests:

  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:
Location:
releases/WebKitGTK/webkit-2.28
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.28/LayoutTests/ChangeLog

    r264098 r264154  
     12020-03-19  Alex Christensen  <achristensen@webkit.org>
     2
     3        Sanitize suggested download filename received from web process
     4        https://bugs.webkit.org/show_bug.cgi?id=209300
     5        <rdar://problem/59487723>
     6
     7        Reviewed by Chris Dumez.
     8
     9        * fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt:
     10        * fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:
     11
    1122020-03-27  Simon Fraser  <simon.fraser@apple.com>
    213
  • releases/WebKitGTK/webkit-2.28/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt

    r213284 r264154  
    11Download started.
    2 Downloading URL with suggested filename "*\.png"
     2Downloading URL with suggested filename "*.png"
    33Download completed.
    4 The suggested filename above should be "*\.png" and the download should succeed.
     4The suggested filename above should be "*.png" and the download should succeed.
    55
    66File backed blob URL
  • releases/WebKitGTK/webkit-2.28/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html

    r240530 r264154  
    1313</head>
    1414<body>
    15 <p>The suggested filename above should be "*\.png" and the download should succeed.</p>
     15<p>The suggested filename above should be "*.png" and the download should succeed.</p>
    1616<a id="blob-url" download="*\">File backed blob URL</a>
    1717<script>
  • releases/WebKitGTK/webkit-2.28/Source/WebKit/ChangeLog

    r264091 r264154  
     12020-03-19  Alex Christensen  <achristensen@webkit.org>
     2
     3        Sanitize suggested download filename received from web process
     4        https://bugs.webkit.org/show_bug.cgi?id=209300
     5        <rdar://problem/59487723>
     6
     7        Reviewed by Chris Dumez.
     8
     9        * UIProcess/Downloads/DownloadProxy.cpp:
     10        (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):
     11
    1122020-07-03  Michael Catanzaro  <mcatanzaro@gnome.org>
    213
  • releases/WebKitGTK/webkit-2.28/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp

    r252274 r264154  
    3939#include "WebProtectionSpace.h"
    4040#include <WebCore/MIMETypeRegistry.h>
     41#include <WebCore/ResourceResponseBase.h>
    4142#include <wtf/FileSystem.h>
    4243#include <wtf/text/CString.h>
    … …  
    185186        return;
    186187   
    187     m_processPool->downloadClient().decideDestinationWithSuggestedFilename(*this, suggestedFilename, [this, protectedThis = makeRef(*this), downloadID = downloadID] (AllowOverwrite allowOverwrite, String destination) {
     188    m_processPool->downloadClient().decideDestinationWithSuggestedFilename(*this, ResourceResponseBase::sanitizeSuggestedFilename(suggestedFilename), [this, protectedThis = makeRef(*this), downloadID = downloadID] (AllowOverwrite allowOverwrite, String destination) {
    188189        SandboxExtension::Handle sandboxExtensionHandle;
    189190        if (!destination.isNull())
Note: See TracChangeset for help on using the changeset viewer.