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

Unified Diff: content/browser/renderer_host/database_message_filter.cc

Issue 12327022: Merge 183141 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 10 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 | webkit/database/database_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/database_message_filter.cc
===================================================================
--- content/browser/renderer_host/database_message_filter.cc (revision 183642)
+++ content/browser/renderer_host/database_message_filter.cc (working copy)
@@ -284,6 +284,13 @@
const string16& description,
int64 estimated_size) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+
+ if (!DatabaseUtil::IsValidOriginIdentifier(origin_identifier)) {
+ RecordAction(UserMetricsAction("BadMessageTerminate_DBMF"));
+ BadMessageReceived();
+ return;
+ }
+
int64 database_size = 0;
db_tracker_->DatabaseOpened(origin_identifier, database_name, description,
estimated_size, &database_size);
@@ -325,6 +332,12 @@
const string16& database_name,
int error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ if (!DatabaseUtil::IsValidOriginIdentifier(origin_identifier)) {
+ RecordAction(UserMetricsAction("BadMessageTerminate_DBMF"));
+ BadMessageReceived();
+ return;
+ }
+
db_tracker_->HandleSqliteError(origin_identifier, database_name, error);
}
« no previous file with comments | « no previous file | webkit/database/database_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698