We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ab4ff5 commit 4a06c10Copy full SHA for 4a06c10
cdk/custom-auth/fido2-credentials-api.ts
@@ -26,7 +26,7 @@ import {
26
UpdateCommand,
27
PutCommand,
28
} from "@aws-sdk/lib-dynamodb";
29
-import { decodeFirstSync } from "cbor";
+import { decodeAllSync } from "cbor";
30
import {
31
determineUserHandle,
32
logger,
@@ -870,8 +870,9 @@ function parseBody(event: { body?: string | null; isBase64Encoded: boolean }) {
870
871
function cborDecode(b: Buffer, name: string) {
872
try {
873
+ const decoded = decodeAllSync(b);
874
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
- return decodeFirstSync(b) as unknown;
875
+ return decoded[0] as unknown;
876
} catch (err) {
877
logger.error(err);
878
throw new UserFacingError(`Invalid ${name}`);
0 commit comments