Summary
Problem
ts-ucan does not allow nbf and nnc to be null.
Impact
ts-ucan reports an invalid payload when either of these fields are null.
Solution
Allow the fields to be null when validating payloads.
The fields are checked here:
|
&& (!util.hasProp(obj, "nbf") || typeof obj.nbf === "number") |
|
&& (!util.hasProp(obj, "nnc") || typeof obj.nnc === "string") |
Summary
Problem
ts-ucandoes not allownbfandnncto benull.Impact
ts-ucanreports an invalid payload when either of these fields arenull.Solution
Allow the fields to be
nullwhen validating payloads.The fields are checked here:
ts-ucan/src/types.ts
Lines 122 to 123 in 978dfd2