digitalbazaar / digitalbazaar/bedrock-tokenization
Handle case that registration options TTL is NaN or invalid
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 2
- Avg merge
- 5m
- Merged PRs (30d)
- 1
Description
https://github.com/digitalbazaar/bedrock-tokenization/blob/v19.1.0/lib/tokens/index.js#L116
Note that Math.max(NaN, anything) will return NaN which is a problem.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at lib/tokens/index.js around line 116 and trace how the registration options TTL is passed into the calculation. Check how NaN or other invalid TTL values currently propagate, then verify that invalid input no longer produces a NaN TTL using the repository's existing tests or test command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100