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

More bounds checking #99

Open
blaine opened this issue May 24, 2023 · 0 comments
Open

More bounds checking #99

blaine opened this issue May 24, 2023 · 0 comments

Comments

@blaine
Copy link
Contributor

blaine commented May 24, 2023

When building a UCAN, it's really easy (esp. from js vs ts) to incorrectly set fields; e.g.,

ucan.build({ ..., facts: { xyz: "abc" } })

will silently omit the facts, as will

ucan.build({ ..., facts: [ { "xyz": "abc" } ] })

This is probably true for a variety of other fields, too. I would suggest adding explicit checks and refusing to build a UCAN if the fields aren't properly formatted, including errors for why the UCAN creation failed. Happy to take on this work if others are in agreement, but it might be worth waiting until we update to 0.10. Just leaving this issue here in the meantime, nothing urgent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant