digitalbazaar / digitalbazaar/bedrock-tokenization

Handle case that registration options TTL is NaN or invalid

Open
#101 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.