1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 20:04:59 +00:00

LibWeb: Disallow cross-origin access to <iframe>.contentDocument

With this patch, we now enforce basic same-origin policy for this one
<iframe> attribute.

To make it easier to add more attributes like this, I've added an
extended IDL attribute ("[ReturnNullIfCrossOrigin]") that does exactly
what it sounds like. :^)
This commit is contained in:
Andreas Kling 2020-09-22 18:26:33 +02:00
parent 4c1f317572
commit 37c287b1d4
4 changed files with 28 additions and 4 deletions

View file

@ -44,6 +44,9 @@ public:
const DOM::Document* content_document() const;
Origin content_origin() const;
bool may_access_from_origin(const Origin&) const;
void content_frame_did_load(Badge<FrameLoader>);
private: