Skip to content

Commit 3284c15

Browse files
committed
Ensure VM ID is a string in ControllerProofPurpose.
1 parent fdaad31 commit 3284c15

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# jsonld-signatures ChangeLog
22

3+
## 11.3.1 - 2024-10-dd
4+
5+
### Fixed
6+
- Ensure verification method ID is a string when checking controller
7+
proof purpose.
8+
39
## 11.3.0 - 2024-08-01
410

511
### Changed

lib/purposes/ControllerProofPurpose.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ module.exports = class ControllerProofPurpose extends ProofPurpose {
7070
}
7171

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

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

0 commit comments

Comments
 (0)