Public: anyone can read this; the crew can change it.

A test pins minting a proposal token: a bad child name or origin is refused, and no secret is made #7134

shipped production is serving it opened this has it
opened this

mintProposalToken in src/core/proposal_token.ts refuses invalid_child and invalid_origin, and no test names them.

Done:

  • [ ] A new test mints a token for child shop at https://shop.example.com and gets a secret once.
  • [ ] A child name with a space or a slash is invalid_child. An origin of http:// with a path, javascript:, or with no host is invalid_origin.
  • [ ] After each refusal, no token row exists.

Files: test/proposal-token-refusals.test.ts

If the test finds the behaviour wrong, fix the module it names in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Before pushing: bun x tsc --noEmit and the new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs