Closed
Bug 387317
Opened 18 years ago
Closed 18 years ago
[FIX]XBL resource stylesheet loads don't do security checks
Categories
(Core :: XBL, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha8
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
(Whiteboard: [sg:low] post 1.8-branch)
Attachments
(1 file)
|
27.13 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
In particular, nsXBLResourceLoader::LoadResources doesn't call CheckLoadURI and doesn't call content policies.
Flags: blocking1.9?
| Assignee | ||
Comment 1•18 years ago
|
||
Er, we do this for images. Just not for stylesheets. I would say we should just make the CSSLoader do it in this case.
Summary: XBL resource stylesheet and image loads don't do security checks → XBL resource stylesheet loads don't do security checks
| Assignee | ||
Comment 2•18 years ago
|
||
Peter, can you take a look? The XBL part is pretty tame, really... if you can't, let me know and I'll ping sicking.
Attachment #271484 -
Flags: superreview?
Attachment #271484 -
Flags: review?
| Assignee | ||
Updated•18 years ago
|
Attachment #271484 -
Flags: superreview?(peterv)
Attachment #271484 -
Flags: superreview?
Attachment #271484 -
Flags: review?(peterv)
Attachment #271484 -
Flags: review?
| Assignee | ||
Comment 3•18 years ago
|
||
The trunk patch also fixes XUL prototype stylesheet loads.
On branch the XUL prototype thing seems to happen only for chrome sheets, so it's only XBL that needs to be fixed. I'll probably do it via copy/paste there...
Assignee: nobody → bzbarsky
Flags: blocking1.8.1.5?
Flags: blocking1.8.0.13?
Summary: XBL resource stylesheet loads don't do security checks → [FIX]XBL resource stylesheet loads don't do security checks
| Assignee | ||
Comment 4•18 years ago
|
||
Ah, and on branch this code uses LoadStyleLink, which does a security check. So branch is completely safe.
Flags: blocking1.8.1.5?
Flags: blocking1.8.0.13?
Whiteboard: trunk-only
Comment 5•18 years ago
|
||
Comment on attachment 271484 [details] [diff] [review]
Proposed fix
>@@ -3547,17 +3547,17 @@ nsHTMLEditor::ReplaceStyleSheet(const ns
> if (!ps) return NS_ERROR_NOT_INITIALIZED;
> nsIDocument *document = ps->GetDocument();
> if (!document) return NS_ERROR_NULL_POINTER;
>
> nsCOMPtr<nsIURI> uaURI;
> rv = NS_NewURI(getter_AddRefs(uaURI), aURL);
> NS_ENSURE_SUCCESS(rv, rv);
>
>- rv = cssLoader->LoadSheet(uaURI, this);
>+ rv = cssLoader->LoadSheet(uaURI, nsnull, nsnull, this);
I wonder if this could be triggered from desginmode or contenteditable, we might want to do the checks then. Anyway, different bug :-).
Attachment #271484 -
Flags: superreview?(peterv)
Attachment #271484 -
Flags: superreview+
Attachment #271484 -
Flags: review?(peterv)
Attachment #271484 -
Flags: review+
| Assignee | ||
Comment 6•18 years ago
|
||
Checked in. We could use tests for this, but not sure how to write them....
Removing security flag, since this is trunk-only.
Group: security
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: blocking1.9? → in-testsuite?
Resolution: --- → FIXED
Updated•18 years ago
|
Whiteboard: trunk-only → [sg:low] post 1.8-branch
Updated•18 years ago
|
Flags: wanted1.8.1.x-
You need to log in
before you can comment on or make changes to this bug.
Description
•