Bug 1643101 - Remove 'whitelist' from Form Autofill code. r=MattN

Differential Revision: https://phabricator.services.mozilla.com/D78124
This commit is contained in:
Jared Wein 2020-06-04 01:44:14 +00:00
Родитель 0326292324
Коммит e69e59d5fb
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -30,11 +30,11 @@ function sanitizeStorageObject(ob) {
if (!ob) {
return null;
}
const whitelist = ["timeCreated", "timeLastUsed", "timeLastModified"];
const allowList = ["timeCreated", "timeLastUsed", "timeLastModified"];
let result = {};
for (let key of Object.keys(ob)) {
let origVal = ob[key];
if (whitelist.includes(key)) {
if (allowList.includes(key)) {
result[key] = origVal;
} else if (typeof origVal == "string") {
result[key] = "X".repeat(origVal.length);