Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(777)

Unified Diff: content/browser/webui/web_ui_data_source_impl.cc

Issue 1217503012: Avoid cross-origin iframe issues when loading PDF in print preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/webui/web_ui_data_source_impl.cc
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc
index ce6b7af4507b839737c7789eaf6fa84ed9024800..d411fe1c828ca44f96faeac8be6e4a5f6e760adf 100644
--- a/content/browser/webui/web_ui_data_source_impl.cc
+++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -71,6 +71,11 @@ class WebUIDataSourceImpl::InternalDataSource : public URLDataSource {
bool ShouldDenyXFrameOptions() const override {
return parent_->deny_xframe_options_;
}
+ void WillServiceRequest(const net::URLRequest* request,
+ std::string* path) const override {
+ // We want to remove any query strings from the path.
+ *path = path->substr(0, path->find_last_of('?'));
Evan Stade 2015/12/18 23:15:10 I'm sure someone more knowledgeable than me has al
raymes 2016/01/04 01:56:18 Oops good catch. Thank you and I added a test to c
+ }
private:
WebUIDataSourceImpl* parent_;
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui.cc ('k') | content/browser/webui/web_ui_data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698