Open Bug 787086 Opened 12 years ago Updated 2 years ago

Lower Editor iframe privileges

Categories

(DevTools :: Source Editor, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: msucan, Unassigned)

Details

Once bug 759351 lands we might be able to lower the privileges we give to the Orion iframe. We need to check if this is possible.
Any progress on this one?
It's blocking Firebug to adopt Orion editor.

Honza
Mihai, when you get a chance can you explain the specific problems with the current orion codebase that prevent this change now?
Good question.

IIRC, Orion currently does create an empty iframe that it tries to document.write() into, and it uses XHR to load the stylesheet from a chrome:// URL (in our codebase). Orion's approach forced us into giving the parent iframe chrome privileges. With content-only privileges Orion failed to initialize.

That was valid when we first integrated Orion, but I can try and see if simply lowering privileges works with the current Orion we use - maybe I missed some changes that would allow us to do the change right now.
Just tested: Orion fails to initialize if I add iframe.setAttribute("type", "content"). Unfortunately, it's not trivial to fix Orion to work in this case.
I'm curious what version of the Orion Editor you guys are using?

The current release and the one previous haven't been using IFrames, document.write, or xhr to load stylesheets (although of course you can if you like). I'm trying to understand if this is a genuine problem in the Orion Editor or just a problem with the current snapshot being used.

If there is a problem preventing you from upgrading to the current release let me know.
(In reply to simon.kaegi from comment #5)
> I'm curious what version of the Orion Editor you guys are using?
> 
> The current release and the one previous haven't been using IFrames,
> document.write, or xhr to load stylesheets (although of course you can if
> you like). I'm trying to understand if this is a genuine problem in the
> Orion Editor or just a problem with the current snapshot being used.
> 
> If there is a problem preventing you from upgrading to the current release
> let me know.

Thank you Simon! We just need to get around to update Orion to the latest version. We will do this soon.
I'm wondering if this is also an issue with CodeMirror?
Summary: Lower Orion iframe privileges → Lower Editor iframe privileges
No longer depends on: 759351
I'm updating Stylish to open its editor in a tab. I get "SecurityError: The operation is insecure." if I do this with Orion, but no problems with CodeMirror. So I'd say no, not an issue any more.
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.