Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw RANGE_ERROR for indexes outside the length of a bitstring. #104

Merged
merged 3 commits into from
Jan 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,11 @@ <h3>Validate Algorithm</h3>
<a href="#bitstring-expansion-algorithm">Bitstring Expansion Algorithm</a>.
</li>
<li>
Let |status| be the value at the position indicated by the
|credentialIndex| times the |size| in the |bitstring|.
Let |status| be the value in the |bitstring| at the position indicated
by the |credentialIndex| multiplied by the |size|. If the |credentialIndex|
multiplied by the |size| is a value outside of the range of the |bitstring|, a
<a data-cite="VC-DATA-MODEL-2.0#RANGE_ERROR">RANGE_ERROR</a> MUST be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current VCDM does not specify a RANGE_ERROR. It only defined PARSING_ERROR, CRYPTOGRAPHIC_SECURITY_ERROR, and MALFORMED_VALUE_ERROR, see https://www.w3.org/TR/vc-data-model-2.0/#problem-details

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opened a PR to register this new type here: w3c/vc-data-model#1405.

raised.
</li>
<li>
For `statusPurpose` of `revocation` or `suspension`,
Expand Down