Changeset 128050 in webkit
- Timestamp:
- Sep 10, 2012 6:06:30 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r128045 r128050 1 2012-09-10 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Sanitize the suggested filename when building the download destination URI 4 https://bugs.webkit.org/show_bug.cgi?id=96260 5 6 Reviewed by Gustavo Noronha Silva. 7 8 The suggested filename returned by the server can contain 9 directory separators so that the filename would be interpreted as 10 a full path. 11 12 * UIProcess/API/gtk/WebKitDownload.cpp: 13 (webkitDownloadDecideDestination): Convert any directory separator 14 contained in the suggested filename to an underscore. 15 1 16 2012-09-10 Simon Hausmann <simon.hausmann@nokia.com> 2 17 -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp
r119493 r128050 99 99 if (!download->priv->destinationURI.isNull()) 100 100 return FALSE; 101 GOwnPtr<char> destination(g_build_filename(g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD), suggestedFilename, NULL)); 101 102 GOwnPtr<char> filename(g_strdelimit(g_strdup(suggestedFilename), G_DIR_SEPARATOR_S, '_')); 103 GOwnPtr<char> destination(g_build_filename(g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD), filename.get(), NULL)); 102 104 GOwnPtr<char> destinationURI(g_filename_to_uri(destination.get(), 0, 0)); 103 105 download->priv->destinationURI = destinationURI.get();
Note: See TracChangeset
for help on using the changeset viewer.