[webkit-reviews] review granted: [Bug 202034] Sanitize suggested filenames used for saving PDFs : [Attachment 379255] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 20 12:12:34 PDT 2019


Chris Dumez <cdumez at apple.com> has granted Tim Horton <thorton at apple.com>'s
request for review:
Bug 202034: Sanitize suggested filenames used for saving PDFs
https://bugs.webkit.org/show_bug.cgi?id=202034

Attachment 379255: Patch

https://bugs.webkit.org/attachment.cgi?id=379255&action=review




--- Comment #9 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 379255
  --> https://bugs.webkit.org/attachment.cgi?id=379255
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379255&action=review

r=me with nits.

> Source/WebKit/ChangeLog:19
> +	   Percent-encode suggested filenames to ensure that they comprise only
one path component

You failed to fix this one.

> Source/WebKit/UIProcess/WebPageProxy.cpp:7830
> +    String encodedFilename =
ResourceResponseBase::sanitizeSuggestedFilename(suggestedFilename);

s/encodedFilename/sanitizedFilename

> Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:501
> +    auto encodedFileName =
ResourceResponseBase::sanitizeSuggestedFilename(suggestedFilename);

s/encodedFilename/sanitizedFilename

Seems like this could be after the data.isEmpty() check.

> Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:513
> +    if (!data.size()) {

data.isEmpty()


More information about the webkit-reviews mailing list