-
Notifications
You must be signed in to change notification settings - Fork 20
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -742,7 +742,10 @@ <h3>Validate Algorithm</h3> | |
</li> | ||
<li> | ||
Let |status| be the value at the position indicated by the | ||
|credentialIndex| times the |size| in the |bitstring|. | ||
|credentialIndex| times the |size| in the |bitstring|. If the |credentialIndex| | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This confuses me.
|credentialIndex| times the |size|
must be withinthe range of the |bitstring|
, since that's whatindicated
the position
of the|status|
value
. The|credentialIndex|
value
itself doesn't appear to have any relation tothe range of the |bitstring|
.I think the above should change to either
or
This is not made as a GitHub suggestion, because a line "deleted" (really, changed) by the PR (line 745) is enveloped in the three I'm changing (lines 744-746).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 1d1a83a.