Skip to content

Resolves issue #1879, fixes date-only query filter sanitization.#1893

Merged
jdaigneau5 merged 2 commits into
devfrom
dr_1879
Jun 30, 2026
Merged

Resolves issue #1879, fixes date-only query filter sanitization.#1893
jdaigneau5 merged 2 commits into
devfrom
dr_1879

Conversation

@david-rocca

Copy link
Copy Markdown
Collaborator

Closes Issue #1879

Summary

This MR fixes toDate() date-only parsing so valid YYYY-MM-DD filters no longer throw ReferenceError, while invalid date-only values return the normal validation error.

Important Changes

src/utils/utils.js

  • Defines a local dateStr in the date-only branch.
  • Validates date-only strings with Luxon before converting them to UTC midnight.

test/unit-tests/utils/utilsTest.js

  • Adds valid and invalid date-only sanitizer coverage.

test/integration-tests/cve/getCveDateTest.js

  • Adds CVE endpoint regression coverage for date-only filters.

test/integration-tests/cve-id/getCveIdTest.js

  • Adds CVE ID endpoint regression coverage for date-only filters.

@jdaigneau5 jdaigneau5 linked an issue Jun 30, 2026 that may be closed by this pull request
6 tasks
@jdaigneau5 jdaigneau5 merged commit 8ba8f57 into dev Jun 30, 2026
9 checks passed
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.

Fix date-only query filter conversion in toDate()

2 participants