Closed
Bug 203211
Opened 22 years ago
Closed 21 years ago
[FIXr]pay attention to content-policies when loading XSLT stylesheets (nsIContentPolicy)
Categories
(Core :: XSLT, defect, P2)
Core
XSLT
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha5
People
(Reporter: axel, Assigned: bzbarsky)
References
Details
Attachments
(2 files, 1 obsolete file)
5.55 KB,
patch
|
bzbarsky
:
review-
peterv
:
superreview+
|
Details | Diff | Splinter Review |
6.27 KB,
patch
|
sicking
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
bz asked us to ask the content policies when loading XSLT stylesheets.
Marking deps on the nsIContentPolicy API bug for starters.
![]() |
Assignee | |
Updated•21 years ago
|
Summary: pay attention to content-policies when loading XSLT stylesheets → pay attention to content-policies when loading XSLT stylesheets (nsIContentPolicy)
![]() |
Assignee | |
Comment 1•21 years ago
|
||
![]() |
Assignee | |
Updated•21 years ago
|
Attachment #161680 -
Flags: superreview?(peterv)
Attachment #161680 -
Flags: review?(bugmail)
Comment 2•21 years ago
|
||
Comment on attachment 161680 [details] [diff] [review]
Somewhat like this
>Index: extensions/transformiix/source/xslt/txMozillaStylesheetCompiler.cpp
>===================================================================
>+ rv = conpol->ShouldLoad(nsIContentPolicy::TYPE_STYLESHEET,
>+ aUri,
>+ referrerURI,
>+ // XXXbz do we have a document here? Or
>+ // can we get a window off the loadgroup?
>+ // Or something for the context?
>+ nsnull,
mProcessor (a txMozillaXSLTProcessor) holds the source document (mSource), I'd
be fine with exposing it so you can get at it here.
>+ NS_LITERAL_CSTRING("text/xsl"),
Hmm, text/xsl doesn't really exist as a mimetype. We only accept it in the type
attribute of the stylesheet PI for compatibility with IE. text/xml?
>+ nsnull,
>+ &decision);
>+ if (decision != nsIContentPolicy::ACCEPT) {
Any reason why you're not using the helper functions and macros from
nsContentPolicyUtils.h in this file?
Attachment #161680 -
Flags: superreview?(peterv) → superreview+
![]() |
Assignee | |
Comment 3•21 years ago
|
||
> I'd be fine with exposing it so you can get at it here.
Sure. Care to attach a patch so I can test?
> text/xml?
Sure.
> Any reason why you're not using the helper functions and macros
I wasn't sure I could include that header here.
Comment 4•21 years ago
|
||
This should allow you to use mProcessor->GetSourceContentModel();
![]() |
Assignee | |
Comment 5•21 years ago
|
||
![]() |
Assignee | |
Updated•21 years ago
|
Attachment #161680 -
Attachment is obsolete: true
Attachment #162488 -
Attachment is obsolete: true
![]() |
Assignee | |
Updated•21 years ago
|
Attachment #161680 -
Attachment is obsolete: false
Attachment #161680 -
Flags: review?(bugmail) → review-
![]() |
Assignee | |
Updated•21 years ago
|
Attachment #162545 -
Flags: superreview?(peterv)
Attachment #162545 -
Flags: review?(bugmail)
Updated•21 years ago
|
Attachment #162545 -
Flags: superreview?(peterv) → superreview+
Comment on attachment 162545 [details] [diff] [review]
Patch updated to comments, with fixed GetSourceContentModel
r=me
do we want to add code for document() loaded documents as well. That's extra
datadocuments loaded by the xslt stylesheet.
Attachment #162545 -
Flags: review?(bugmail) → review+
![]() |
Assignee | |
Comment 7•21 years ago
|
||
Taking.
(In reply to comment #6)
> do we want to add code for document() loaded documents as well. That's extra
> datadocuments loaded by the xslt stylesheet.
I basically added the content policy check to the one place where XSLT called
CheckLoadURI. Does it not call CheckLoadURI for document() loaded documents?
If so, then we should indeed add both CheckLoadURI and content policy checks
there...
Assignee: peterv → bzbarsky
Priority: -- → P2
Summary: pay attention to content-policies when loading XSLT stylesheets (nsIContentPolicy) → [FIXr]pay attention to content-policies when loading XSLT stylesheets (nsIContentPolicy)
Target Milestone: --- → mozilla1.8alpha5
![]() |
Assignee | |
Comment 8•21 years ago
|
||
Fixed. Sicking, want to file a followup on the document() issue?
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Filed 265901
You need to log in
before you can comment on or make changes to this bug.
Description
•