Bug 1511249 - Ensure that 3rdPartyStorage permissions are checked with the exact tracker origin not just with a prefix r=johannh

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2018-11-30 14:36:36 +00:00
Родитель ae6d6d1827
Коммит e62ed1ac15
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -1051,6 +1051,13 @@ StorageAccessPermissionPrompt.prototype = {
let origins = new Set();
while (perms.length) {
let perm = perms.shift();
// Let's make sure that we're not looking at a permission for
// https://exampletracker.company when we mean to look for the
// permisison for https://exampletracker.com!
if (perm.type != prefix &&
!perm.type.startsWith(`${prefix}^`)) {
continue;
}
origins.add(perm.principal.origin);
}
return origins.size;