Skip to content

Conversation

@jdalton
Copy link
Member

@jdalton jdalton commented Dec 17, 2025

  • Fix prototype pollution in baseSet and baseUnset
  • Fix cyclic value comparison in equalArrays and equalObjects
  • Fix command injection vulnerability in template (variable validation, sourceURL whitespace)
  • Add array iteratee handling in baseOrderBy
  • Add early return for empty arrays in baseSortedIndexBy
  • Fix sortBy JSDoc example ages
  • Fix setCacheHas JSDoc return type

- Fix prototype pollution in baseSet and baseUnset
- Fix cyclic value comparison in equalArrays and equalObjects
- Fix command injection vulnerability in template (variable validation, sourceURL whitespace)
- Add array iteratee handling in baseOrderBy
- Add early return for empty arrays in baseSortedIndexBy
- Fix sortBy JSDoc example ages
- Fix setCacheHas JSDoc return type
Copy link
Member

@jonchurch jonchurch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewing...

@falsyvalues
Copy link
Member

@jdalton baseTrim and trimmedEndIndex is missing.

Copy link
Member

@jonchurch jonchurch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@falsyvalues beat me by 1 minute!

This is missing the baseTrim and baseTrimEndIndex changes

We also havea JSDoc update that hasn't landed in main yet, not a blocker but we want to make sure we land that change into main.

Copy link
Member

@falsyvalues falsyvalues left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonchurch
Copy link
Member

jonchurch commented Dec 17, 2025

Luckily the commands to regenerate this file are captured in the header comment.

It's hinky bc it requires using @bnjmnt4n's forked lodash-cli (as the lodas-cli is archived, but changes were needed to it, and we need those changes here as well)

  1. Checkout the branch you want to compare against
  2. Install the lodash-cli fork: npm i -D github:bnjmnt4n/lodash-cli
  3. Copy main's lodash.js as the source: git show main:dist/lodash.js > node_modules/lodash/lodash.js (make sure you've got latest main!)
  4. Run the build command from the header comment:
    • AMD: npx lodash exports=amd -d -o ./main.js
  5. Check the diff: git diff main.js

Caveats which are indicative of the issues w/ treating main's lodash.js as source of truth, but it currently having drifted slightly:

  • The regenerated file will have VERSION from main's source (4.17.21), so you'll need to bump it after (bumping version in main would prevent this, but we were saving it for last)
  • The setCacheHas JSDoc has a bug in main (@returns {number} should be @returns {boolean}) - this regresses the fix that was in the distribution branches
  • For minified files, postprocess.js in lodash-cli replaces the full license header with a short one, so those need manual handling to replace it with the longer one (remnant of the license being updated manually, but the cli not getting the update)

plus the setCacheHas JSDoc tweak bc see it fix it aye
@jonchurch
Copy link
Member

jonchurch commented Dec 17, 2025

I pushed the result of regenerating from main in bcbbbbc

@jdalton jdalton marked this pull request as ready for review December 18, 2025 01:19
@jdalton
Copy link
Member Author

jdalton commented Dec 18, 2025

@falsyvalues did @jonchurch's fix tackle it?

Copy link
Member

@falsyvalues falsyvalues left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except of this additional change, the rest looks good!

 * @returns {boolean} Returns `true` if `value` is found, else `false`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants