Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@simplewebauthn/server

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@simplewebauthn/server - npm Package Compare versions

Comparing version 8.3.2 to 8.3.3

7

esm/helpers/parseAuthenticatorData.js

@@ -49,4 +49,6 @@ import { decodeAuthenticatorExtensions, } from './decodeAuthenticatorExtensions.js';

const bytesAtCurrentPosition = authData.slice(pointer, pointer + badEdDSACBOR.byteLength);
let foundBadCBOR = false;
if (isoUint8Array.areEqual(badEdDSACBOR, bytesAtCurrentPosition)) {
// Change the bad CBOR 0xa3 to 0xa4 so that the credential public key can be recognized
foundBadCBOR = true;
authData[pointer] = 0xa4;

@@ -57,2 +59,7 @@ }

const firstEncoded = Uint8Array.from(isoCBOR.encode(firstDecoded));
if (foundBadCBOR) {
// Restore the bit we changed so that `authData` is the same as it came in and won't break
// signature verification.
authData[pointer] = 0xa3;
}
credentialPublicKey = firstEncoded;

@@ -59,0 +66,0 @@ pointer += firstEncoded.byteLength;

4

package.json

@@ -5,3 +5,3 @@ {

"name": "@simplewebauthn/server",
"version": "8.3.2",
"version": "8.3.3",
"description": "SimpleWebAuthn for Servers",

@@ -59,3 +59,3 @@ "license": "MIT",

"@peculiar/asn1-x509": "^2.3.6",
"@simplewebauthn/typescript-types": "^8.0.0",
"@simplewebauthn/typescript-types": "^8.3.3",
"cbor-x": "^1.5.2",

@@ -62,0 +62,0 @@ "cross-fetch": "^4.0.0"

@@ -52,4 +52,6 @@ "use strict";

const bytesAtCurrentPosition = authData.slice(pointer, pointer + badEdDSACBOR.byteLength);
let foundBadCBOR = false;
if (index_js_1.isoUint8Array.areEqual(badEdDSACBOR, bytesAtCurrentPosition)) {
// Change the bad CBOR 0xa3 to 0xa4 so that the credential public key can be recognized
foundBadCBOR = true;
authData[pointer] = 0xa4;

@@ -60,2 +62,7 @@ }

const firstEncoded = Uint8Array.from(index_js_1.isoCBOR.encode(firstDecoded));
if (foundBadCBOR) {
// Restore the bit we changed so that `authData` is the same as it came in and won't break
// signature verification.
authData[pointer] = 0xa3;
}
credentialPublicKey = firstEncoded;

@@ -62,0 +69,0 @@ pointer += firstEncoded.byteLength;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc