Title: [208295] trunk/Source/WebKit2
- Revision
- 208295
- Author
- [email protected]
- Date
- 2016-11-02 11:52:39 -0700 (Wed, 02 Nov 2016)
Log Message
REGRESSION (r199558): File paths selected for upload are stored using the wrong string encoding
https://bugs.webkit.org/show_bug.cgi?id=164311
<rdar://problem/26995374>
Reviewed by Tim Horton.
-[NSURL fileSystemRepresentation] returns a char* in file system representation, which on
iOS is UTF-8, but we were implicitly converting it to a String, which assumes a char* is
Latin-1 encoded.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]): Changed to use fromUTF8() to
convert fileURL.fileSystemRepresentation to a String.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (208294 => 208295)
--- trunk/Source/WebKit2/ChangeLog 2016-11-02 18:26:26 UTC (rev 208294)
+++ trunk/Source/WebKit2/ChangeLog 2016-11-02 18:52:39 UTC (rev 208295)
@@ -1,3 +1,19 @@
+2016-11-02 Andy Estes <[email protected]>
+
+ REGRESSION (r199558): File paths selected for upload are stored using the wrong string encoding
+ https://bugs.webkit.org/show_bug.cgi?id=164311
+ <rdar://problem/26995374>
+
+ Reviewed by Tim Horton.
+
+ -[NSURL fileSystemRepresentation] returns a char* in file system representation, which on
+ iOS is UTF-8, but we were implicitly converting it to a String, which assumes a char* is
+ Latin-1 encoded.
+
+ * UIProcess/ios/forms/WKFileUploadPanel.mm:
+ (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]): Changed to use fromUTF8() to
+ convert fileURL.fileSystemRepresentation to a String.
+
2016-11-02 Carlos Garcia Campos <[email protected]>
NetworkSession: Network process crash when converting main resource to download
Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm (208294 => 208295)
--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm 2016-11-02 18:26:26 UTC (rev 208294)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm 2016-11-02 18:52:39 UTC (rev 208295)
@@ -342,7 +342,7 @@
Vector<String> filenames;
filenames.reserveInitialCapacity(count);
for (NSURL *fileURL in fileURLs)
- filenames.uncheckedAppend(fileURL.fileSystemRepresentation);
+ filenames.uncheckedAppend(String::fromUTF8(fileURL.fileSystemRepresentation));
NSData *jpeg = UIImageJPEGRepresentation(iconImage, 1.0);
RefPtr<API::Data> iconImageDataRef = adoptRef(toImpl(WKDataCreate(reinterpret_cast<const unsigned char*>([jpeg bytes]), [jpeg length])));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes