Closed Bug 191920 Opened 22 years ago Closed 22 years ago

P3P Summary button does not work anymore

Categories

(Core :: XML, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.4final

People

(Reporter: harishd, Assigned: peterv)

References

Details

(Keywords: regression, Whiteboard: [adt3])

Attachments

(2 files, 3 obsolete files)

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.
> 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.
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?
>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.
Jonas: This bug still exists even after your checkin to bug 185498.
taking P3P bugs
QA Contact: keith → gbush
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.
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
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
Attached patch Fix some JS errors (obsolete) — Splinter Review
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...
>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. ***
adt: nsbeta1+/adt3
Keywords: nsbeta1nsbeta1+
Whiteboard: [adt3]
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.
Attached patch WIP v1 (obsolete) — Splinter Review
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.
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).
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).
Depends on: 193033
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
I think the origin for chrome should be just "chrome://", so maybe I should special-case GetOrigin.
Depends on: 205725
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
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
Attached patch v1 (obsolete) — Splinter Review
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
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+
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+
Comment on attachment 124758 [details] [diff] [review] v1 oops didn't mean to sr= :)
Attachment #124758 - Flags: superreview+ → superreview?
Attachment #124758 - Flags: superreview?
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.
Attached patch v1.1Splinter Review
Attachment #124758 - Attachment is obsolete: true
Attachment #124812 - Flags: superreview?(jst)
Attachment #124812 - Flags: review+
Attachment #124812 - Flags: superreview?(jst) → superreview+
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?
a=adt to land this on the 1.4 branch. Please add the fixed1.4 keyword once you land this. Thanks.
Checked in on trunk, waiting for drivers.
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.
<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.
Patch landed on 1.4 branch. Will open a separate bug for the profile issue ( P3P summary works only in new profile ).
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Keywords: fixed1.4
Resolution: --- → FIXED
strange- I was able to see the summary window populated on the trunk builds
verified on branch builds mac 2003060905 win 2003060905 linux 2003060907
Keywords: fixed1.4verified1.4
verified on trunk builds, all platforms mac 2003060905 win 2003060905 linux 2003060907
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: