зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1605191 - Make nsIPrincipal attributes camelcase. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D58537 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3af5bbb2e9
Коммит
c6ab4134b8
|
@ -210,7 +210,7 @@ interface nsIPrincipal : nsISerializable
|
|||
* Returns an ASCII compatible representation
|
||||
* of the principals Origin
|
||||
*/
|
||||
readonly attribute ACString AsciiOrigin;
|
||||
[noscript] readonly attribute ACString asciiOrigin;
|
||||
|
||||
/**
|
||||
* Returns the ASCII Spec from the Principals URI.
|
||||
|
@ -220,7 +220,7 @@ interface nsIPrincipal : nsISerializable
|
|||
* WARNING: DO NOT USE FOR SECURITY CHECKS.
|
||||
* just for logging purposes!
|
||||
*/
|
||||
readonly attribute ACString AsciiSpec;
|
||||
[noscript] readonly attribute ACString asciiSpec;
|
||||
|
||||
/**
|
||||
* Checks if the Principal's URI Scheme matches with the parameter
|
||||
|
@ -260,7 +260,7 @@ interface nsIPrincipal : nsISerializable
|
|||
*
|
||||
* This method returns false instead of throwing upon errors.
|
||||
*/
|
||||
readonly attribute bool IsOriginPotentiallyTrustworthy;
|
||||
readonly attribute bool isOriginPotentiallyTrustworthy;
|
||||
|
||||
/**
|
||||
* Returns the Flags of the Principals
|
||||
|
|
|
@ -49,12 +49,12 @@ add_task(async function test_isOriginPotentiallyTrustworthy() {
|
|||
]) {
|
||||
let uri = NetUtil.newURI(uriSpec);
|
||||
let principal = gScriptSecurityManager.createContentPrincipal(uri, {});
|
||||
Assert.equal(principal.IsOriginPotentiallyTrustworthy, expectedResult);
|
||||
Assert.equal(principal.isOriginPotentiallyTrustworthy, expectedResult);
|
||||
}
|
||||
// And now let's test whether .onion sites are properly treated when
|
||||
// whitelisted, see bug 1382359.
|
||||
Services.prefs.setBoolPref("dom.securecontext.whitelist_onions", true);
|
||||
let uri = NetUtil.newURI("http://1234567890abcdef.onion/");
|
||||
let principal = gScriptSecurityManager.createContentPrincipal(uri, {});
|
||||
Assert.equal(principal.IsOriginPotentiallyTrustworthy, true);
|
||||
Assert.equal(principal.isOriginPotentiallyTrustworthy, true);
|
||||
});
|
||||
|
|
|
@ -12,7 +12,7 @@ add_task(
|
|||
{}
|
||||
);
|
||||
Assert.equal(
|
||||
principal.IsOriginPotentiallyTrustworthy,
|
||||
principal.isOriginPotentiallyTrustworthy,
|
||||
true,
|
||||
"it is potentially trustworthy"
|
||||
);
|
||||
|
|
|
@ -100,7 +100,7 @@ this.InsecurePasswordUtils = {
|
|||
if (uri.schemeIs("http")) {
|
||||
isFormSubmitHTTP = true;
|
||||
if (
|
||||
principal.IsOriginPotentiallyTrustworthy ||
|
||||
principal.isOriginPotentiallyTrustworthy ||
|
||||
// Ignore sites with local IP addresses pointing to local forms.
|
||||
(this._isPrincipalForLocalIPAddress(
|
||||
aForm.rootElement.nodePrincipal
|
||||
|
|
Загрузка…
Ссылка в новой задаче