Skip to content

Commit

Permalink
Ensure VM ID is a string in ControllerProofPurpose.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Oct 3, 2024
1 parent fdaad31 commit 3284c15
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# jsonld-signatures ChangeLog

## 11.3.1 - 2024-10-dd

### Fixed
- Ensure verification method ID is a string when checking controller
proof purpose.

## 11.3.0 - 2024-08-01

### Changed
Expand Down
5 changes: 5 additions & 0 deletions lib/purposes/ControllerProofPurpose.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ module.exports = class ControllerProofPurpose extends ProofPurpose {
}

const {id: verificationId} = verificationMethod;
if(typeof verificationId !== 'string') {
throw new Error(
`Verification method ID "${verificationMethod.id}" ` +
'must be a string.');
}
const {term, _termDefinedByDIDContext} = this;

// if no `controller` specified, use verification method's
Expand Down

0 comments on commit 3284c15

Please sign in to comment.