Skip to content

Commit bc960ea

Browse files
authored
Merge pull request #1333 from CVEProject/dr-sec-bulkDLredact
Bulkdownload redaction
2 parents 08fc53e + 16ea6fb commit bc960ea

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/controller/cve-id.controller/cve-id.controller.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,14 @@ async function getFilteredCveId (req, res, next) {
149149
// No redaction, original requested_by.user is in requested_by.cna and owning_cna
150150
i.requested_by.user = orgMap[cnaid].users[i.requested_by.user]
151151
}
152-
153152
i.owning_cna = orgMap[i.owning_cna].shortname
153+
// Finally, if the user is bulk download, redact the entire requested by object and owning cna
154+
if (isBulkDownload) {
155+
i.owning_cna = 'REDACTED'
156+
i.requested_by.user = 'REDACTED'
157+
i.requested_by.cna = 'REDACTED'
158+
}
159+
154160
return i
155161
})
156162
}

0 commit comments

Comments
 (0)