Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodeca/js-yaml
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5.4.0
Choose a base ref
...
head repository: nodeca/js-yaml
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5.4.1
Choose a head ref
  • 4 commits
  • 5 files changed
  • 2 contributors

Commits on Aug 26, 2026

  1. fix: count empty merge sources against maxTotalMergeKeys (#797)

    The maxTotalMergeKeys guard (added for the quadratic merge-key DoS,
    GHSA-g796-fgmg-93mv) charges the budget once per *folded* key. A merge
    source that folds no keys — an empty mapping — therefore costs real work
    but never touches the counter. Aliasing one N-element sequence of empty
    mappings into K merge targets does O(K*N) work while the guard never
    fires:
    
      arr: &arr [{}, {}, ...]   # N empty maps
      targets:
        - <<: *arr              # x K
    
    With merge enabled (YAML11_SCHEMA), an ~500 KB document of this shape
    takes ~13s to load and scales quadratically, restoring the DoS the guard
    was meant to prevent; a real key-folding merge of the same size is
    correctly rejected.
    
    Charge one unit for a source that folds no keys, so a sequence of empty
    mappings is bounded by maxTotalMergeKeys like any other merge. Normal and
    single empty-map merges are unaffected.
    spokodev authored Aug 26, 2026
    Configuration menu
    Copy the full SHA
    6a8e05f View commit details
    Browse the repository at this point in the history
  2. Cleanup 6a8e05f, #797

    puzrin committed Aug 26, 2026
    Configuration menu
    Copy the full SHA
    dfd3a29 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e54dea3 View commit details
    Browse the repository at this point in the history
  4. 5.4.1 released

    puzrin committed Aug 26, 2026
    Configuration menu
    Copy the full SHA
    e5a3ba0 View commit details
    Browse the repository at this point in the history
Loading