mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 956382 - Consider document.domain when computing security wrappers. r=mrbkap
This commit is contained in:
parent
e0f33e6e2e
commit
2b33b064b7
@ -323,7 +323,7 @@ DEBUG_CheckUnwrapSafety(HandleObject obj, js::Wrapper *handler,
|
||||
// this case.
|
||||
} else {
|
||||
// Otherwise, it should depend on whether the target subsumes the origin.
|
||||
MOZ_ASSERT(handler->hasSecurityPolicy() == !AccessCheck::subsumes(target, origin));
|
||||
MOZ_ASSERT(handler->hasSecurityPolicy() == !AccessCheck::subsumesConsideringDomain(target, origin));
|
||||
}
|
||||
}
|
||||
#else
|
||||
@ -385,8 +385,8 @@ WrapperFactory::Rewrap(JSContext *cx, HandleObject existing, HandleObject obj,
|
||||
JSCompartment *target = js::GetContextCompartment(cx);
|
||||
bool originIsChrome = AccessCheck::isChrome(origin);
|
||||
bool targetIsChrome = AccessCheck::isChrome(target);
|
||||
bool originSubsumesTarget = AccessCheck::subsumes(origin, target);
|
||||
bool targetSubsumesOrigin = AccessCheck::subsumes(target, origin);
|
||||
bool originSubsumesTarget = AccessCheck::subsumesConsideringDomain(origin, target);
|
||||
bool targetSubsumesOrigin = AccessCheck::subsumesConsideringDomain(target, origin);
|
||||
bool sameOrigin = targetSubsumesOrigin && originSubsumesTarget;
|
||||
XrayType xrayType = GetXrayType(obj);
|
||||
bool waiveXrayFlag = flags & WAIVE_XRAY_WRAPPER_FLAG;
|
||||
|
Loading…
Reference in New Issue
Block a user