mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #2161 from keepassxreboot/fix/passkeys_alg_string_firefox_version
Parse algorithm type as Number(). Fix required Firefox version.
This commit is contained in:
commit
ed63d9a53e
2 changed files with 16 additions and 6 deletions
2
dist/manifest_firefox.json
vendored
2
dist/manifest_firefox.json
vendored
|
|
@ -160,7 +160,7 @@
|
|||
"applications": {
|
||||
"gecko": {
|
||||
"id": "keepassxc-browser@keepassxc.org",
|
||||
"strict_min_version": "67.0"
|
||||
"strict_min_version": "96.0"
|
||||
}
|
||||
},
|
||||
"default_locale": "en"
|
||||
|
|
|
|||
|
|
@ -72,20 +72,30 @@ kpxcPasskeysUtils.buildCredentialCreationOptions = function(pkOptions, sameOrigi
|
|||
publicKey.authenticatorSelection = pkOptions?.authenticatorSelection;
|
||||
publicKey.challenge = arrayBufferToBase64(pkOptions.challenge);
|
||||
publicKey.extensions = pkOptions?.extensions;
|
||||
publicKey.pubKeyCredParams = pkOptions?.pubKeyCredParams;
|
||||
|
||||
// Make sure integers are used for "alg". Set to reserved if not found.
|
||||
// https://www.iana.org/assignments/cose/cose.xhtml#algorithms
|
||||
publicKey.pubKeyCredParams = [];
|
||||
if (pkOptions.pubKeyCredParams) {
|
||||
for (const credParam of pkOptions.pubKeyCredParams) {
|
||||
publicKey.pubKeyCredParams.push({
|
||||
type: credParam?.type,
|
||||
alg: credParam.alg ? Number(credParam.alg) : 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
publicKey.rp = pkOptions?.rp;
|
||||
publicKey.timeout = getTimeout(publicKey?.authenticatorSelection?.userVerification, pkOptions?.timeout);
|
||||
|
||||
publicKey.excludeCredentials = [];
|
||||
if (pkOptions.excludeCredentials && pkOptions.excludeCredentials.length > 0) {
|
||||
for (const cred of pkOptions.excludeCredentials) {
|
||||
const arr = {
|
||||
publicKey.excludeCredentials.push({
|
||||
id: arrayBufferToBase64(cred.id),
|
||||
transports: cred.transports,
|
||||
type: cred.type
|
||||
};
|
||||
|
||||
publicKey.excludeCredentials.push(arr);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue