зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1269238 - allow text-links to use origin principals for link opening checks, r=mikedeboer
MozReview-Commit-ID: HPWxEyNEsps --HG-- extra : rebase_source : 4fb5f3f3baca236f5507235929d50c249abe3ebd extra : histedit_source : 69fab5bf3f2859c5c7d208432585db7354f15d53
This commit is contained in:
Родитель
ad30ee9e1c
Коммит
916b0a33fe
|
@ -129,11 +129,11 @@
|
|||
#endif
|
||||
</description>
|
||||
<description class="text-blurb" id="communityExperimentalDesc">
|
||||
&community.exp.start;<label class="text-link" href="http://www.mozilla.org/">&community.exp.mozillaLink;</label>&community.exp.middle;<label class="text-link" href="about:credits">&community.exp.creditsLink;</label>&community.exp.end;
|
||||
&community.exp.start;<label class="text-link" href="http://www.mozilla.org/">&community.exp.mozillaLink;</label>&community.exp.middle;<label class="text-link" useoriginprincipal="true" href="about:credits">&community.exp.creditsLink;</label>&community.exp.end;
|
||||
</description>
|
||||
</vbox>
|
||||
<description class="text-blurb" id="communityDesc">
|
||||
&community.start2;<label class="text-link" href="http://www.mozilla.org/">&community.mozillaLink;</label>&community.middle2;<label class="text-link" href="about:credits">&community.creditsLink;</label>&community.end3;
|
||||
&community.start2;<label class="text-link" href="http://www.mozilla.org/">&community.mozillaLink;</label>&community.middle2;<label class="text-link" useoriginprincipal="true" href="about:credits">&community.creditsLink;</label>&community.end3;
|
||||
</description>
|
||||
<description class="text-blurb" id="contributeDesc">
|
||||
&helpus.start;<label class="text-link" href="https://sendto.mozilla.org/page/contribute/Give-Now?source=mozillaorg_default_footer&ref=firefox_about&utm_campaign=firefox_about&tm_source=firefox&tm_medium=referral&utm_content=20140929_FireFoxAbout">&helpus.donateLink;</label>&helpus.middle;<label class="text-link" href="http://www.mozilla.org/contribute/">&helpus.getInvolvedLink;</label>&helpus.end;
|
||||
|
@ -143,8 +143,8 @@
|
|||
</hbox>
|
||||
<vbox id="bottomBox">
|
||||
<hbox pack="center">
|
||||
<label class="text-link bottom-link" href="about:license">&bottomLinks.license;</label>
|
||||
<label class="text-link bottom-link" href="about:rights">&bottomLinks.rights;</label>
|
||||
<label class="text-link bottom-link" useoriginprincipal="true" href="about:license">&bottomLinks.license;</label>
|
||||
<label class="text-link bottom-link" useoriginprincipal="true" href="about:rights">&bottomLinks.rights;</label>
|
||||
<label class="text-link bottom-link" href="https://www.mozilla.org/privacy/">&bottomLinks.privacy;</label>
|
||||
</hbox>
|
||||
<description id="trademark">&trademarkInfo.part1;</description>
|
||||
|
|
|
@ -314,10 +314,15 @@
|
|||
|
||||
uri = ioService.newURI(href, null, null);
|
||||
|
||||
var nullPrincipal = secMan.createNullPrincipal({});
|
||||
let principal;
|
||||
if (this.getAttribute("useoriginprincipal") == "true") {
|
||||
principal = this.nodePrincipal;
|
||||
} else {
|
||||
principal = secMan.createNullPrincipal({});
|
||||
}
|
||||
try {
|
||||
secMan.checkLoadURIWithPrincipal(nullPrincipal, uri,
|
||||
nsISSM.DISALLOW_INHERIT_PRINCIPAL)
|
||||
secMan.checkLoadURIWithPrincipal(principal, uri,
|
||||
nsISSM.DISALLOW_INHERIT_PRINCIPAL);
|
||||
}
|
||||
catch (ex) {
|
||||
var msg = "Error: Cannot open a " + uri.scheme + ": link using \
|
||||
|
|
Загрузка…
Ссылка в новой задаче