Closed
Bug 191920
Opened 22 years ago
Closed 22 years ago
P3P Summary button does not work anymore
Categories
(Core :: XML, defect, P1)
Core
XML
Tracking
()
VERIFIED
FIXED
mozilla1.4final
People
(Reporter: harishd, Assigned: peterv)
References
Details
(Keywords: regression, Whiteboard: [adt3])
Attachments
(2 files, 3 obsolete files)
11.88 KB,
text/html
|
Details | |
21.05 KB,
patch
|
peterv
:
review+
jst
:
superreview+
brendan
:
approval1.4+
|
Details | Diff | Splinter Review |
Jonas, please take a look at comment #31 (
http://bugzilla.mozilla.org/show_bug.cgi?id=177822#c31 ) in bug 177822.
![]() |
||
Comment 1•22 years ago
|
||
Harish, where is the stylesheet linked from? What is the URI used? What _is_
"aProvider" at that point?
Boris, the style sheets ( *.xsl ) are under extensions/p3p/resources/content. We
select the appropriate style sheet based on the site you visit ( to reproduce
the problem go to www.ibm.com and click on pageInfo->Privacy->Summary ).
"aProvider" was empty at that point. However, in today's build I don't get any
assertions but the policy viewer window renders blank :-(
Btw, the style sheet loading happens in nsPolicyViewer.js.
![]() |
||
Comment 4•22 years ago
|
||
> nsPolicyViewer.js
This file does not exist in LXR, in my tree, or in the last patch attached to
bug 177822
> "aProvider" was empty at that point
That's almost certainly a bug in the chrome registration of the package.
So what _is_ the URI used to link to the sheet? The exact URI?
>This file does not exist in LXR, in my tree, or in the last patch attached to
>bug 177822
This is not in mozilla tree yet. However, it should be available in patch v1.1
in bug 177822. Sorry about that.
>So what _is_ the URI used to link to the sheet?
chrome://communicator/content/p3p/p3p200201.xsl"
With the recent build ( yesterday's ) I see "content" for aProvider and
"p3p/p3p200201.xsl" for aFile. That is, I don't hit the error NS_ERROR("unknown
provider"); anymore but the policy viewer window renders blank.
![]() |
||
Comment 7•22 years ago
|
||
Hmm... with that URL you should never be hitting the "unknown provider"
assertion, since that has a filename...
Boris: Like I said I don't see the "Unknown provider" problem anymore however
the policy viewer window renders blank.
i wonder if this could be bug 185498. Harish, does the P3P code still use the
old js-interface with transformDocument?
Reporter | ||
Comment 10•22 years ago
|
||
>i wonder if this could be bug 185498. Harish, does the P3P code still use the
>old js-interface with transformDocument?
Looks like it. If this is what you meant:
xsltp.transformDocument(source, style, result, null);
exactly, i'm checking in bug 185498 as soon as the tree opens and then we should
see if that was it.
Reporter | ||
Comment 12•22 years ago
|
||
Jonas: This bug still exists even after your checkin to bug 185498.
P3P code is now in the Mozilla tree, but not yet built by default. To build,
give this option to configure:
--enable-extensions=default,p3p
Keywords: nsbeta1,
regression
Summary: P3P does not work in mozilla/netscape anymore → P3P Summary button does not work anymore
To reproduce, go to a P3P supporting site (see
http://www.w3.org/P3P/compliant_sites ), open the Page Info dialog (View > Page
Info), select the Privacy tab, and click the Summary button.
Assignee | ||
Comment 16•22 years ago
|
||
Pfff, this is so not an XSLT bug. That was clear even from before the bug was
filed: the stylesheet is not loading. Jonas: feel free to reassign as needed.
Component: XSLT → XML
Assignee | ||
Comment 17•22 years ago
|
||
Trying to load chrome://communicator/content/p3p/p3p200012.xsl in a recent
version of Mozilla just shows a blank page.
oh, thanks for investigating! Reassining to harish then, probably a packaging
problem? On the bright side this should be an easy fix then :-)
Assignee: bugmail → harishd
I can load the XSLT files from the chrome URLs just fine with recent builds.
What happens though (after applying this patch) is that I get JS errors from
mailNavigatorOverlay.xul! And then a blank summary page... This seems bizarre,
to say the least...
I tested with http://www.1-800-buy-cheap-phentermine-online.com/ , click lock
icon, select Privacy tab (and wait for the progress control to finish?) and
click Summary button.
It seems like we actually do the transformation, but we fail to show the result
document. Save Page As saves the document, and DOM Inspector can also "see" the
transformed document.
Another strange thing is that for some reason the transformed document has
question marks in places where I would expect section numbers.
Btw, one more minor nit in the JS: the document.load() does not take mime type
arg, remove |, "text/xml"|.
Comment on attachment 118836 [details] [diff] [review]
Fix some JS errors
r=sicking on this one
Attachment #118836 -
Flags: review+
Now I am hitting the "unknown provider" assertion/error as well with today's
build. I don't know what changed since my last pull that caused this.
I can make this "work" again (i.e. to get the "blank" summary window) by forcing
nsCodebasePrincipal::GetOrigin() to go through the else clause, ie. GetSpec() so
that the chrome URL for the XSLT file does not get truncated to
"chrome://communicator". I am wondering why GetHostPort() returns success for
chrome URLs...
Reporter | ||
Comment 23•22 years ago
|
||
>Now I am hitting the "unknown provider" assertion/error as well with today's
>build.
This is the error I reported in
http://bugzilla.mozilla.org/show_bug.cgi?id=177822#c31.
*** Bug 203851 has been marked as a duplicate of this bug. ***
Comment 25•22 years ago
|
||
adt: nsbeta1+/adt3
Assignee | ||
Comment 26•22 years ago
|
||
I'm stuck at the same point as comment 22. Can we resolve the problems with
nsCodebasePrincipal and chrome URIs? I'll try to figure out why the transform
doesn't result in something visible.
Assignee | ||
Comment 27•22 years ago
|
||
This fixes most of the issues. The policy shows up, but we're missing
scrollbars. Note that this does not fix the issue with chrome urls.
Assignee | ||
Comment 28•22 years ago
|
||
Bz: the trouble with the chrome URLs is coming from
nsScriptSecurityManager::GetCodebasePrincipal
(http://lxr.mozilla.org/seamonkey/source/caps/src/nsScriptSecurityManager.cpp#1722)
which calls nsCodebasePrincipal::GetOrigin
(http://lxr.mozilla.org/seamonkey/source/caps/src/nsCodebasePrincipal.cpp#177).
Since chrome urls use nsStandardURL we end up in the codepath where GetHostPort
succeeds and so we truncate the URL to chrome://package and the NS_NewURI in
nsScriptSecurityManager::GetCodebasePrincipal
(http://lxr.mozilla.org/seamonkey/source/caps/src/nsScriptSecurityManager.cpp#1745)
fails because that doesn't have a provider. So we don't get the principal and
return an error. We could special case chrome in GetOrigin to get the complete
spec. On the other hand, it kind of makes sense to use chrome://package as the
origin (and that used to be a valid chrome url).
![]() |
||
Comment 29•22 years ago
|
||
Mitch already has a bug on the issue with GetOrigin. There is some discussion
in it as to why this is no longer a valid URL (the short of it is that the only
reason it used to be valid is that there was no sanity-checking of chrome urls
until you tried to open them, at which point that URL would spectacularly fail).
Comment 30•22 years ago
|
||
I bet the scrollbars issue is the same as bug 202809.
Add blocking bug 204727, as we should have the fragment as stylesheet param, which
needs the new interface.
Blocks: 204727
Comment 31•22 years ago
|
||
I think the origin for chrome should be just "chrome://", so maybe I should
special-case GetOrigin.
Peter has been working on this, reassigning.
Peter, could you attach a patch that is the best so far, something that we could
ship with? We are running out of time, so I think we should take whatever works
best now, and see if we can finish the work later.
Assignee: harishd → peterv
Flags: blocking1.4?
Target Milestone: --- → mozilla1.4final
Assignee | ||
Comment 33•22 years ago
|
||
Yeah, I've fixed most of the problems. I'm rebuilding right now and will attach
a patch after I've tested it once more.
Status: NEW → ASSIGNED
OS: Windows XP → All
Priority: -- → P1
Hardware: PC → All
Assignee | ||
Comment 34•22 years ago
|
||
I had to work around some bugs in other Mozilla code. Also, I need to set the
anchor links to a complete URI, otherwise I get a security exception. I used
the policy URI (minus the ref) for resolving the anchors. It's not really
correct, but it works.
Attachment #118836 -
Attachment is obsolete: true
Attachment #122614 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #124758 -
Flags: review?(heikki)
Comment on attachment 124758 [details] [diff] [review]
v1
Really weird, but if it works I am happy, r/sr=heikki.
Harishd, could you also have a look?
I noticed you took out some context menu items - didn't they work?
Attachment #124758 -
Flags: review?(heikki) → review+
Reporter | ||
Comment 36•22 years ago
|
||
Comment on attachment 124758 [details] [diff] [review]
v1
You can remove the following lines in nsP3PModule.cpp as well
{"P3P Service",
NS_P3PSERVICE_CID,
"@mozilla.org/p3p/p3pservice;1",
nsP3PServiceConstructor,
},
no?
With an answer to heikki's question and mine r=harishd :)
Attachment #124758 -
Flags: superreview+
Reporter | ||
Comment 37•22 years ago
|
||
Comment on attachment 124758 [details] [diff] [review]
v1
oops didn't mean to sr= :)
Attachment #124758 -
Flags: superreview+ → superreview?
Attachment #124758 -
Flags: superreview?
Assignee | ||
Comment 38•22 years ago
|
||
The context menu was never hooked up, I just removed the unused items. I tried
hooking it up, but for example the "Find again" item was always enabled, even if
I didn't do "Find" first. I think we should not enable it until someone fixes
it. And I'll remove the lines from nsP3PModule.cpp.
Assignee | ||
Comment 39•22 years ago
|
||
Attachment #124758 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #124812 -
Flags: superreview?(jst)
Attachment #124812 -
Flags: review+
Comment 40•22 years ago
|
||
Comment on attachment 124812 [details] [diff] [review]
v1.1
sr=jst
Attachment #124812 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 41•22 years ago
|
||
Comment on attachment 124812 [details] [diff] [review]
v1.1
This is a low-risk patch that fixes the P3P Summary button in the privacy tab
in Page Info. Without this fix the feature is completely broken (the button
doesn't do anything). I've tested this with a couple of sites that have a P3P
policy.
Attachment #124812 -
Flags: approval1.4?
Comment 42•22 years ago
|
||
a=adt to land this on the 1.4 branch. Please add the fixed1.4 keyword once you
land this. Thanks.
Assignee | ||
Comment 43•22 years ago
|
||
Checked in on trunk, waiting for drivers.
Comment 44•22 years ago
|
||
Comment on attachment 124812 [details] [diff] [review]
v1.1
Can you cite the bug #s in the comment?
+// XXX Temporary function to workaround disappearing scrollbars
+// and bug in document.appendChild(DocumentFragment).
a=brendan,rjesup for 1.4.
/be
Attachment #124812 -
Flags: approval1.4? → approval1.4+
Bummer, the patch does not work! I get a security exception, and then a dialog
saying there is no policy. My guess is that Peter had an additional patch/hack
in his local tree to get round the security error, but forgot about it. Peter is
gone for the weekend, but Harish is now looking at this.
Reporter | ||
Comment 46•22 years ago
|
||
<strange> works with new profile but not with existing ones AFAICT </strange>
Filed bug 208559 for the comment issue and bug 208560 for the profile issue.
Reporter | ||
Comment 48•22 years ago
|
||
Patch landed on 1.4 branch. Will open a separate bug for the profile issue ( P3P
summary works only in new profile ).
Comment 49•22 years ago
|
||
strange- I was able to see the summary window populated on the trunk builds
Comment 50•22 years ago
|
||
verified on branch builds
mac 2003060905
win 2003060905
linux 2003060907
Keywords: fixed1.4 → verified1.4
Comment 51•22 years ago
|
||
verified on trunk builds, all platforms
mac 2003060905
win 2003060905
linux 2003060907
Status: RESOLVED → VERIFIED
Updated•22 years ago
|
Flags: blocking1.4?
You need to log in
before you can comment on or make changes to this bug.
Description
•