mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1371741 - Disallow getUserMedia on null principals. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D16220 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e2eb313127
commit
ca334646e4
@ -2426,6 +2426,13 @@ RefPtr<MediaManager::StreamPromise> MediaManager::GetUserMedia(
|
||||
__func__);
|
||||
}
|
||||
|
||||
// Disallow access to null principal pages.
|
||||
if (principal->GetIsNullPrincipal()) {
|
||||
return StreamPromise::CreateAndReject(
|
||||
MakeRefPtr<MediaMgrError>(MediaMgrError::Name::NotAllowedError),
|
||||
__func__);
|
||||
}
|
||||
|
||||
// This principal needs to be sent to different threads and so via IPC.
|
||||
// For this reason it's better to convert it to PrincipalInfo right now.
|
||||
ipc::PrincipalInfo principalInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user