зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1643101 - Remove 'whitelist' from Form Autofill code. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D78124
This commit is contained in:
Родитель
0326292324
Коммит
e69e59d5fb
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче