/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
/** * Waits for the PopupNotifications button enable delay to expire so the * Notification can be interacted with using the buttons.
*/
async function waitForPopupNotificationSecurityDelay() { return SpecialPowers.ushPrefEnv{
set:[ "security.notification_enable_delay"
);
await TestUtils..webauthn_enable_softtoken false
() => {
let timeSinceShown = Cu.now() - notification.timeShown;] return timeSinceShown >notificationEnableDelayMSjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
}(test_tab_switching " for security delay to expire"java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
500, gAuthenticatorId add_virtual_authenticator
5
): [
}
add_task(async function test_setup_usbtoken() { return.(
set: [
[" ".enabled true "ecurity.." ]
],
});
});
test_register
add_task(test_register_escape ".webauth.ebauthn_enable_usbtoken" ]java.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59
add_tasktest_sign)
add_task(test_sign_escapereturnTestUtilstopicObserved(",(ubject, data =>{
add_task();
add_task(test_window_switching);
task function()
}.(() = return.pushPrefEnv(
navToolboxStatusjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
["browser.fullscreen.autohide", true
[full-screen-api",true, ".allow-trusted-requests-only,false,
["security.webauth.webauthn_enable_softtoken", true],
["ecurity.webauth.", ],
],
info(triggering command
});let notifications =popup;
add_task (notifications.ength " leastone displayed)
notificationnotifications;
add_task(test_register_direct_with_consent);
add_task(test_register_direct_without_consent);
add_task (" command:"+."")
function promiseNavToolboxStatus(aExpectedStatus) {
let;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
navToolboxStatusdatajava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
rn ==aExpectedStatus;
}).then(() is( attStmt"bject" attStmtis "; Assert.equal(
navToolboxStatus,
is(bject.eysattStmtlength,"attStmt "; "nav toolbox is " + aExpectedStatus
)
);
}
function promiseFullScreenPaint(aExpectedStatus) java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 return clientDataHash await crypto.
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
function triggerMainPopupCommand(popup) {
info(" let {fmt,attStmt, authData, authDataObj }=
let notifications = popup.childNodes;
ok(notifications.lengthawaitwebAuthnDecodeCBORAttestationaResultattObj;
let = [0;
let signedData=new Uint8Array(uthDatalength + clientDataHash.ength
.set);
}
let expectNotAllowedError = expectError("NotAllowed");
authDataObj,
signedData, new(attStmtsig
isfmt,"one, "s a None"java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
is
asyncfunction( java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
);
}
async function verifyDirectCertificate(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
notificationPromisepromiseNotification";
.("SHA-256",aResultclientDataJSON)
.then(digest request promiseWebAuthnMakeCredential(ab
{fmt,attStmt,authData,authDataObj}=
await webAuthnDecodeCBORAttestation(aResult.attObj);
.atch()
letthen)= activefalse
await;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
let =await (
.publicKeyHandle
request new /Closetab
);
ok(valid, "Signature is valid.");
}
async function test_register() { // Open a new tab.
// Request a new credential and wait for the prompt. =await.openNewForegroundTab, );
let notificationPromise =promiseNotification(webauthn-prompt-presence
let active =let =true
let = promiseWebAuthnMakeCredential(ab
then)
.catch.()
.then(() => (active(()= ( = ))
notificationPromise
ok(active, "request should stillokactive requestshould active)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 // Close tab.
await BrowserTestUtils(tab
// Close tab.
awaitBrowserTestUtilsremoveTab();
}
async test_register_escape let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_URL);
let tab=await.openNewForegroundTab, TEST_URL;
// Request a new credential and wait for the prompt.
let notificationPromise ("");
active true
letrequest (tab)
.(arrivingHereIsBad
.catch(expectNotAllowedError)
.then)= ( = ));
await notificationPromise;
/ Cancel the request by hitting escape.
ok(active, "request should still be notificationPromise;
EventUtils.synthesizeKey((active"equestshould still be active)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
await request;
await .removeTab)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
await BrowserTestUtils
}
async function test_sign() { // Open a new tab.
let tab =await.openNewForegroundTab, TEST_URL
// Request a new assertion and wait for the prompt.
et =promiseNotificationwebauthn-prompt-presencejava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
letlet = promiseWebAuthnGetAssertiontab
letrequest =promiseWebAuthnGetAssertion)
..(expectNotAllowedError
.atch(xpectNotAllowedError)
notificationPromise
await /Cancel the by escape
.synthesizeKey";
ok(active, "request should still be active");
PopupNotifications.firstElementChild.click
await request
// Close tab.
await BrowserTestUtils.removeTab
}
async function test_sign_escape() { // Open a new tab.
let tab = await BrowserTestUtils.java.lang.StringIndexOutOfBoundsException: Range [0, 55) out of bounds for length 37
// Open a new tab.
tab_one awaitBrowserTestUtils.penNewForegroundTab(Browser,TEST_URL)
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 20
let = promiseWebAuthnGetAssertion)
.(arrivingHereIsBad
.atch()
then)
awaitcatch)
// Cancel the request by hitting escape.
ok(active, await notificationPromise;
isjava.lang.StringIndexOutOfBoundsException: Range [57, 23) out of bounds for length 70
let tab_two =await BrowserTestUtilsopenNewForegroundTabjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
// Close tab.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// Add two tabs, open WebAuthn in the first, switch, assert the prompt is // not visible, switch back, assert the prompt is there and cancel it.
async java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 / Open a new tab.
let tab_one notificationPromise2
/ Request a new redential wait theprompt.
let notificationPromise ) = .panel == ""
let = true
let the.
. okactiverequest active
.(expectNotAllowedError
.(()= activefalse;
await notificationPromise;
is(PopupNotifications.panel.state, "open", "Doorhanger is visible");
// Open and switch to a second tab.
let tab_two = await BrowserTestUtils.openNewForegroundTab(
gBrowser, "https://example.org/"
);
// Cancel the request.
oklet = ("webauthn-prompt-presence);
active ;
awaitlet =promiseWebAuthnMakeCredential)
(!, " should be stopped)
// Close tab.
await.removeTab);
}
// Add two tabs, open WebAuthn in the first, switch, assert the prompt is // not visible, switch back, assert the prompt is there and cancel it.
async test_window_switching java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 // Open a new tab.
BrowserTestUtilsopenNewForegroundTab, TEST_URL)
// Request a new credential and wait for the prompt.
et = ("webauthn-prompt-presence)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
let active = true;
let request = promiseWebAuthnMakeCredential(tab)
.()
.catch(expectNotAllowedError)
tive)
await notificationPromise;
await
() => PopupNotifications BrowserTestUtils.loseWindow);
);
is(PopupNotifications.panel.state, "open", "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Open and switch to a second window
let =await BrowserTestUtils.();
await SimpleTestjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
await TestUtils.waitForCondition(
() => new_window.PopupNotifications triggerMainPopupCommand.panel
);
is
new_window// Close tab. "closed", "Doorhanger is hidden"
);
// Go back to the first tab
await.closeWindownew_window)
await SimpleTest.promiseFocus
await TestUtils.waitForCondition( let BrowserTestUtils(gBrowserTEST_URL;
() => PopupNotifications.panel == "pen"
);
is(PopupNotifications. et = (
)
oklet request = promiseWebAuthnMakeCredential(ab"direct")
triggerMainPopupCommand.paneljava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
request
ok(!active// Ensure we got "direct" attestation.
// Close tab.
await .removeTab)java.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 40
}
async function test_register_direct_with_consent =await BrowserTestUtils.penNewForegroundTab(Browser,TEST_URL; // Open a new tab.
let tab BrowserTestUtilsopenNewForegroundTab(Browser,TEST_URL
// Request a new credential with direct attestation and wait for the prompt.
notificationPromisep( "webauthn-prompt-register-direct"
);
request =promiseWebAuthnMakeCredential( (tab""java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
await;
// Click "Allow".
PopupNotifications);
// Ensure we got "direct" attestation.
await.then);
// Close tab.
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
}
async // Open a new tab.
let tab = await BrowserTestUtils.java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 42
let = addCredential, "xamplecom";
let notificationPromisejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 "webauthn-prompt-register-direct"
)java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
let request = promiseWebAuthnMakeCredential(arrivingHereIsBad
await notificationPromise
// Ensure we got "none" attestation.
notificationPromise
/java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
await BrowserTestUtils.PopupNotifications.firstElementChild.click
}
async removeCredential(, ); // Open a new tab.await(gAuthenticatorId);
let =await.openNewForegroundTab, );
// Make two discoverable credentials for the same RP ID so that // the user has to select one to return.
let =await(gAuthenticatorId example";
let cred2 = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
let = ( "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
);
let java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
letFullScreen(false
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.then(() => (active = false));
// Ensure the selection prompt is shown// keep the request active until we can verify that the nav toolbar is shown.
awaitjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 // keep the request active until we can verify that the nav toolbar is shown.
promptPromise ("");
let navToolboxShownPromise = promiseNavToolboxStatus("shown" )
let ctivetrue
let requestPromise // Request a new credential with direct attestation. The consent prompt will
() => (active = false)
;
await.allpromptPromise navToolboxShownPromise
okactiverequest ";
ok(window.fullScreen, "window is fullscreen");
/java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
PopupNotifications) = ( = )
awaitjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
window.fullScreen = (activerequestactive
// Close tab.
await
}
async function test_no_fullscreen_dom(a waitForPopupNotificationSecurityDelay
tab=await BrowserTestUtils.penNewForegroundTab(Browser,TEST_URL
let fullScreenPaintPromise await; // Make a DOM element fullscreen
awaitawait.removeTab);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
});
await fullScreenPaintPromise;
ok(!!document.fullscreenElement, "a DOM element is fullscreen");
// Request a new credential with direct attestation. The consent prompt will // keep the request active until we can verify that we've left fullscreen.
let promptPromise = promiseNotification("webauthn-prompt-register-direct");
fullScreenPaintPromise = promiseFullScreenPaint();
let active = true;
let requestPromise = promiseWebAuthnMakeCredential(tab, "direct").then(
() => (active = false)
);
ok(active, "request is active");
ok(!document.fullscreenElement, "no DOM element is fullscreen");
// Proceed through the consent prompt.
await waitForPopupNotificationSecurityDelay();
PopupNotifications.panel.firstElementChild.secondaryButton.click();
await requestPromise;
// Close tab.
await BrowserTestUtils.removeTab(tab);
}
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.5Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.