Skip to content

Conversation

@tyler-catlin
Copy link

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

javascript interprets the number 0 as falsy, but 0 is the default epoch for rpm packages; this means that any time we have an rpm package with epoch 0, we just throw it straight in the garbage.

What are the relevant tickets?

https://snyksec.atlassian.net/browse/CN-482

@tyler-catlin tyler-catlin changed the title Cn 482 use correct falsy checks fix: CN-482 use correct falsy checks Nov 13, 2025
@tyler-catlin tyler-catlin marked this pull request as ready for review November 13, 2025 17:27
@tyler-catlin tyler-catlin requested a review from a team as a code owner November 13, 2025 17:27
@snyk-pr-review-bot
Copy link

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

}

if (pkg.epoch) {
if (pkg.epoch !== undefined && pkg.epoch !== null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this handle pkg.epoch = 0 correctly? I'm not too familiar with the dumpster fire wonderful joy that is true/false checks in JS, and I'm also not familiar with the pkg.epoch

Copy link
Contributor

Choose a reason for hiding this comment

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

Disregard this, I need to learn to read the full PR message before looking at the code

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.

3 participants