Skip to content

0.8.985

Choose a tag to compare

@DirazCoder DirazCoder released this 11 Sep 22:38
· 5 commits to 0.8.x since this release

temporal-fmt v0.8.985

Security

  • formatDistance/formatDistanceToNow reject years outside
    [-271821, 275760] (Temporal's representable range) instead of walking a
    year-per-iteration day-count loop toward them. A hostile duck-typed field
    bag ({year: 2e8} from app-parsed user data, say) turned that loop into a
    cheap CPU-denial primitive — around 380ms/call at year 2e8, scaling roughly
    linearly past that. Real Temporal values always clear the check without
    issue.
  • format(…, 'ww'/'RRRR') with a duck-typed field bag whose year falls
    outside that same range now throws instead of walking the ISO-week Jan-1
    weekday computation year by year — same CPU-denial shape, roughly
    360ms/call at year 2e8. This is a security fix only: the 0.9.x line's
    broader behavioral changes (O(1) closed forms, wider field validation)
    aren't backported here on purpose — this LTS line only takes fixes,
    not behavior changes.