зеркало из https://github.com/mozilla/gecko-dev.git
Bug 982460 - privileged-request-sans-event. r=spenrose
This commit is contained in:
Родитель
de99f78284
Коммит
ff8f1e047c
|
@ -169,14 +169,13 @@ nsDOMIdentity.prototype = {
|
|||
let message = this.DOMIdentityMessage(aOptions);
|
||||
|
||||
// We permit calling of request() outside of a user input handler only when
|
||||
// we are handling the (deprecated) get() or getVerifiedEmail() calls,
|
||||
// which make use of an RP context marked as _internal, or when a certified
|
||||
// app is calling.
|
||||
//
|
||||
// XXX Bug 982460 - grant the same privilege to packaged apps
|
||||
// a certified or privileged app is calling, or when we are handling the
|
||||
// (deprecated) get() or getVerifiedEmail() calls, which make use of an RP
|
||||
// context marked as _internal.
|
||||
|
||||
if (!aOptions._internal &&
|
||||
this._appStatus !== Ci.nsIPrincipal.APP_STATUS_CERTIFIED) {
|
||||
this._appStatus !== Ci.nsIPrincipal.APP_STATUS_CERTIFIED &&
|
||||
this._appStatus !== Ci.nsIPrincipal.APP_STATUS_PRIVILEGED) {
|
||||
|
||||
// If the caller is not special in one of those ways, see if the user has
|
||||
// preffed on 'syntheticEventsOk' (useful for testing); otherwise, if
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
<html>
|
||||
<!--
|
||||
Certified and privileged apps can call mozId outside an event handler
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=971379
|
||||
Certified apps: https://bugzilla.mozilla.org/show_bug.cgi?id=971379
|
||||
Privileged apps: https://bugzilla.mozilla.org/show_bug.cgi?id=982460
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
|
|
@ -94,16 +94,13 @@ let apps = [
|
|||
},
|
||||
},
|
||||
{
|
||||
title: "a privileged app, which may not use synthetic events (until bug 982460 lands)",
|
||||
title: "a privileged app, which may use synthetic events",
|
||||
manifest: "https://example.com/manifest_priv.webapp",
|
||||
origin: "https://example.com",
|
||||
uri: "https://example.com/chrome/dom/identity/tests/mochitest/file_syntheticEvents.html",
|
||||
wantIssuer: "firefox-accounts",
|
||||
expected: {
|
||||
success: false,
|
||||
errors: [
|
||||
"ERROR_REQUEST_WHILE_NOT_HANDLING_USER_INPUT",
|
||||
],
|
||||
success: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче