Skip to content

feat(ctap2): enforce getInfo request limits#278

Open
AlfioEmanueleFresta wants to merge 1 commit into
masterfrom
feat/enforce-getinfo-limits
Open

feat(ctap2): enforce getInfo request limits#278
AlfioEmanueleFresta wants to merge 1 commit into
masterfrom
feat/enforce-getinfo-limits

Conversation

@AlfioEmanueleFresta

Copy link
Copy Markdown
Member

Authenticators report size and credential-list limits that the client did not act on, so oversized requests failed at the device with opaque errors. This keeps requests within the reported message size, drops credential ids too long to belong to the device, and reports an over-count list clearly. The checks run on both the preflight and direct paths.

Closes #254.

…-size limits

The maxMsgSize, maxCredentialCountInList and maxCredentialIdLength fields from authenticatorGetInfo were parsed but never read. Enforce them before sending make-credential and get-assertion requests on both the preflight and non-preflight paths so cable is covered. Drop allow and exclude entries whose id exceeds maxCredentialIdLength, reject lists over maxCredentialCountInList, and bound the serialized request by maxMsgSize using the 1024-byte default when the field is absent. A new PlatformError::RequestTooLarge surfaces these cases instead of relying on the authenticator CTAP status.
@AlfioEmanueleFresta AlfioEmanueleFresta marked this pull request as ready for review June 15, 2026 21:25
@AlfioEmanueleFresta AlfioEmanueleFresta marked this pull request as draft June 15, 2026 21:33
@AlfioEmanueleFresta AlfioEmanueleFresta marked this pull request as ready for review June 15, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ctap2): enforce authenticatorGetInfo limits before sending

1 participant