[webkit-reviews] review granted: [Bug 61155] [fileapi] Add a File::createWithName method to avoid obfuscated filename leakage from FileEntry.file() method : [Attachment 94150] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 19 18:52:55 PDT 2011


Jian Li <jianli at chromium.org> has granted Adam Klein <adamk at chromium.org>'s
request for review:
Bug 61155: [fileapi] Add a File::createWithName method to avoid obfuscated
filename leakage from FileEntry.file() method
https://bugs.webkit.org/show_bug.cgi?id=61155

Attachment 94150: Patch
https://bugs.webkit.org/attachment.cgi?id=94150&action=review

------- Additional Comments from Jian Li <jianli at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=94150&action=review

> Source/WebCore/fileapi/File.cpp:39
> +    const String& nameForMIMEType = !name.isEmpty() ? name : path;

Simpler to say:
  static PassOwnPtr<BlobData> createBlobDataForFile(const String& path, const
String& nameForMIMEType = String())
  {
      ...
      if (nameForMIMEType.isEmpty())
	  nameForMIMEType = path;

> Source/WebCore/fileapi/File.h:56
> +    // Create a file whose name, for purposes of MIME type and access
through |File.name|, does not match its path.

How about something like:
  // Create a file with different name exposed to the user (File.type and
File.name in DOM), that is different from the one provided in the path.


More information about the webkit-reviews mailing list