Closed Bug 256945 Opened 20 years ago Closed 20 years ago

chrome links to MPL and NPL from about: page don't work


(SeaMonkey :: UI Design, defect)

Windows 2000
Not set


(Not tracked)



(Reporter: aha, Assigned: bzbarsky)




(Keywords: regression)


(2 files, 1 obsolete file)

MPL and NPL links to licenses in chrome doesn't work and should be changed to
working location:

Security Error: Content at about: may not load or link to

Error: uncaught exception: Load of chrome://global/content/MPL-1.1.html denied.

Security Error: Content at about: may not load or link to
Hmm. This is a different bug to the Firefox one (which was a missing file.) It's
probably some security improvements which have caught this legitimate use of
chrome:// from about:.

Not sure who to ask about that. jst?

seems to work fine for me on recent windows builds.
Chris: Still same with 2004090206/trunk/W2K for me.
With some help from bz to really narrow this down, this regressed between
2004071407 and 2004071419. timeless' checkin for bug 251368 was responsible.
Still broken with 2004101405, btw.
Given the conversation in bug 251368, requesting blocking1.8a5 (as there's no
blocking1.8final flag yet). We really do need to sort this out - it's not very
good if someone downloads the software, looks for the licence and can't read it.

Flags: blocking1.8a5?
Attached patch One approach (obsolete) — Splinter Review
This implements about:NPL and about:MPL and allows anything (including, but not
limited to, about:) to link to them.
about:mpl is probably not the best name, because soon that licence will become
the MPL/LGPL/GPL tri-licence. Also, other vendors might want to use that URL to
put the details of their binary licences on (which can be different, according
to the MPL).

I know we'll get into spelling issues, but I suspect about:licen[cs]e is more
future-proof. Implement both if it's trivial, otherwise go with the majority
spelling (licence ;-).

Implementing both is trivial.  The problem is that we have two licenses we need
to link to.... so we still need two different names for them. 
about:otherlicense?  Or what?  ;)
Actually, we don't have two licences - we can just use the MPL with the NPL diff
addendum. And, even if we did, we could just put them one above another in the

IMO, about:licen[cs]e should be defined as giving details of the licensing of
the app you are using - however complex that is.

If someone (not I; I'm not willing to touch that stuff) fixes things so there is
one and only one license file, I will be quite glad to point about:license and
about:licence to it.

Note that others wishing to use about:license/licence would need to put their
license into the exact same chrome location for it to work, however.
Fair enough. I will do that - but I can't for the next month. However, given
that this is a suite-only problem, and we're not releasing in the next month,
that's OK.

Assignee: guifeatures → gerv
Flags: blocking1.8a5? → blocking1.8a5+
Gerv, how do you define month? (or how do you define release?) ;-P  

We should try to get this fixed for the upcoming alpha, I think.
Summary: chrome links to MPL and NPL from about: page doesn't work → chrome links to MPL and NPL from about: page don't work
Flags: blocking1.8a5+ → blocking1.8a5-
Product: Core → Mozilla Application Suite
Asa: I define "month" as "November" in that context. :-) We've missed a5; let's
try for a6.

Flags: blocking1.8a6?
Attached file Licence file
This file contains the MPL and also the NPL addendum, with a short explanatory

It's not particularly pretty, but I'm confident that after it gets checked in,
seventeen volunteers will appear with alternate stylesheets, a switching
system, JavaScript which replaces the word "license" with "licence" throughout
depending on which about: URL you used to access the page, and validation

</me reads bz's current name>

Hopefully bz will be able to rev his patch when he returns from his Christmas
break :-)

We'll take this if it's ready in time. If not, then it can wait until Beta.
Flags: blocking1.8a6? → blocking1.8a6-
Flags: blocking1.8b?
bz: are you able to finish this off soon? It's reasonably important that our
builds have the correct licence notices available.


I'm hoping to get to it later today, actually.
Attached patch PatchSplinter Review
So the changes I made were:

1)  Change the MPL-1.1.html in the tree to be the one Gerv attached
2)  Change about: and the security manager to allow linking to about:license
    about:licence from everywhere.

I left NPL-1.1.html as-is (packaged and all), in case some extensions want to
show it or something.

Gerv, could you please review the changes to about.xhtml that I made?  In
particular, should I still be using the conjunction "and" between the license
names?	Or would "or" be more appropriate?
Attachment #163756 - Attachment is obsolete: true
Attachment #171422 - Flags: superreview?(darin)
Attachment #171422 - Flags: review?(gerv)
Comment on attachment 171422 [details] [diff] [review]

And is fine for the moment; but perhaps you might like to take this opportunity
to rename MPL-1.1.html to something like licen[cs]e.html? I have various plans
for that file (notifications for some BSD-ish code, for example), and the name
is going to get more and more inappropriate.

Attachment #171422 - Flags: review?(gerv) → review+
Comment on attachment 171422 [details] [diff] [review]

>Index: netwerk/protocol/about/src/nsAboutRedirector.cpp
> static RedirEntry kRedirMap[] = {
>+    { "license", "chrome://global/content/MPL-1.1.html", PR_TRUE },
>+    { "licence", "chrome://global/content/MPL-1.1.html", PR_TRUE },

why is this entry repeated?

>+    { "about:license",
>+      nsAboutRedirector::Create
>+    },
>+    { "about:licence",
>+      nsAboutRedirector::Create
>+    },

again, why is this repeated?

>Index: caps/src/nsScriptSecurityManager.cpp

>+            path.EqualsLiteral("license") ||
>+            path.EqualsLiteral("licence") ||

uhm... folks?  I don't get it :-(
Attachment #171422 - Flags: superreview?(darin) → superreview-
BTW sr=me without the duplication of code :)
Darin, there are two spellings of the word "license" -- the British spelling and
the American spelling.  My patch adds support for both, per explicit request
from Gerv in comment 7.
Comment on attachment 171422 [details] [diff] [review]

doh!  and i starred at those strings for a while, but somehow missed the
difference :(
Attachment #171422 - Flags: superreview- → superreview+
Assignee: gerv → bzbarsky
Target Milestone: --- → mozilla1.8beta
Patch checked in as-is.  Gerv, could you file a separate bug on renaming the
file?  That involves changing the files that point to it, and getting it
CVS moved by someone with access to the CVS server....
Closed: 20 years ago
Resolution: --- → FIXED
Has such a bug been filed (renaming)?

I also wonder if there is a bug for updating the file per comment 14. I'm am
willing to update the file as I have done for MPL-1.1.html.
Flags: blocking1.8b?
Bug 280658 added for file renaming issue. Anne - if you wish to fix the markup,
please file another bug. However, you may want to wait to fix it until I've
updated those files some more, which I hope to do soon.

Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.