Skip to content

feat(ctap2): enforce getInfo request limits#278

Merged
AlfioEmanueleFresta merged 1 commit into
masterfrom
feat/enforce-getinfo-limits
Jun 19, 2026
Merged

feat(ctap2): enforce getInfo request limits#278
AlfioEmanueleFresta merged 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.

@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
…-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 force-pushed the feat/enforce-getinfo-limits branch from 725b8de to 3654ab6 Compare June 19, 2026 21:33
@AlfioEmanueleFresta AlfioEmanueleFresta merged commit ee077e7 into master Jun 19, 2026
5 checks passed
@AlfioEmanueleFresta AlfioEmanueleFresta deleted the feat/enforce-getinfo-limits branch June 19, 2026 21:33
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