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

Unified Diff: chrome/renderer/notification_provider.cc

Issue 2779005: Allow creating HTML notifications with the data: scheme. I've confirmed this... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 6 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/notification_provider.cc
===================================================================
--- chrome/renderer/notification_provider.cc (revision 49172)
+++ chrome/renderer/notification_provider.cc (working copy)
@@ -95,11 +95,13 @@
bool NotificationProvider::ShowHTML(const WebNotification& notification,
int id) {
- // Disallow HTML notifications from non-HTTP schemes.
+ // Disallow HTML notifications from unwanted schemes. javascript:
+ // in particular allows unwanted cross-domain access.
GURL url = notification.url();
if (!url.SchemeIs(chrome::kHttpScheme) &&
!url.SchemeIs(chrome::kHttpsScheme) &&
- !url.SchemeIs(chrome::kExtensionScheme))
+ !url.SchemeIs(chrome::kExtensionScheme) &&
+ !url.SchemeIs(chrome::kDataScheme))
return false;
DCHECK(notification.isHTML());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698