Bug 1553413 - Update and harden form data filtering for privacy to account for no data being passed in. r=dao

Differential Revision: https://phabricator.services.mozilla.com/D32116

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike de Boer 2019-05-22 09:46:58 +00:00
Родитель 9839cdb574
Коммит 68fc536019
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -46,7 +46,7 @@ var PrivacyFilter = Object.freeze({
// If the given form data object has an associated URL that we are not
// allowed to store data for, bail out. We explicitly discard data for any
// children as well even if storing data for those frames would be allowed.
if (data.url && !PrivacyLevel.check(data.url)) {
if (!data || (data.url && !PrivacyLevel.check(data.url))) {
return null;
}