Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/controller/cve.controller/cve.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ async function getFilteredCves (req, res, next) {
for (let i = 0; i < timeModified.timeStamp.length; i++) {
if (timeModified.dateOperator[i] === 'lt') {
if (cnaModified) {
options.hint = { 'cve.containers.cna.providerMetadata.dateUpdated': 1 }
query['cve.containers.cna.providerMetadata.dateUpdated'] = {}
// Due to this not being the mongo created date object, we need to actually check the "ISO String" version of this _NOT_ the date object that is being created in the middleware
query['cve.containers.cna.providerMetadata.dateUpdated'].$lt = timeModifiedLtDateObject.toISOString()
Expand All @@ -121,6 +122,7 @@ async function getFilteredCves (req, res, next) {
}
} else {
if (cnaModified) {
options.hint = { 'cve.containers.cna.providerMetadata.dateUpdated': 1 }
query['cve.containers.cna.providerMetadata.dateUpdated'] = {}
// Due to this not being the mongo created date object, we need to actually check the "ISO String" version of this _NOT_ the date object that is being created in the middleware
query['cve.containers.cna.providerMetadata.dateUpdated'].$gt = timeModifiedGtDateObject.toISOString()
Expand Down
Loading