48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
From d7ee6342bf9a63dc47fd28567008c44cd6e44bad Mon Sep 17 00:00:00 2001
|
|
From: Peter Van der Beken <peterv@propagandism.org>
|
|
Date: Thu, 19 May 2022 14:31:53 +0000 (22 months ago)
|
|
Subject: [PATCH] CVE-2022-1802
|
|
|
|
---
|
|
dom/notification/old/NotificationDB.jsm | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/dom/notification/old/NotificationDB.jsm b/dom/notification/old/NotificationDB.jsm
|
|
index e950404f50..06c4d40680 100644
|
|
--- a/dom/notification/old/NotificationDB.jsm
|
|
+++ b/dom/notification/old/NotificationDB.jsm
|
|
@@ -40,8 +40,8 @@ var NotificationDB = {
|
|
return;
|
|
}
|
|
|
|
- this.notifications = {};
|
|
- this.byTag = {};
|
|
+ this.notifications = Object.create(null);
|
|
+ this.byTag = Object.create(null);
|
|
this.loaded = false;
|
|
|
|
this.tasks = []; // read/write operation queue
|
|
@@ -111,7 +111,7 @@ var NotificationDB = {
|
|
// populate the list of notifications by tag
|
|
if (this.notifications) {
|
|
for (var origin in this.notifications) {
|
|
- this.byTag[origin] = {};
|
|
+ this.byTag[origin] = Object.create(null);
|
|
for (var id in this.notifications[origin]) {
|
|
var curNotification = this.notifications[origin][id];
|
|
if (curNotification.tag) {
|
|
@@ -344,8 +344,8 @@ var NotificationDB = {
|
|
var origin = data.origin;
|
|
var notification = data.notification;
|
|
if (!this.notifications[origin]) {
|
|
- this.notifications[origin] = {};
|
|
- this.byTag[origin] = {};
|
|
+ this.notifications[origin] = Object.create(null);
|
|
+ this.byTag[origin] = Object.create(null);
|
|
}
|
|
|
|
// We might have existing notification with this tag,
|
|
--
|
|
2.27.0
|
|
|