Skip to content

Commit d8d1bd0

Browse files
Potential fix for code scanning alert no. 69: Database query built from user-controlled sources
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 35b99ad commit d8d1bd0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

controllers/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ async function getAllVersions(obj) {
207207
* This is the because some of the @ids have different RERUM URL patterns on them.
208208
**/
209209
//All the children of this object will have its @id in __rerum.history.prime
210-
const ls_versions = await db.find({ "__rerum.history.prime": rootObj['@id'] }).toArray()
210+
const ls_versions = await db.find({ "__rerum.history.prime": { $eq: rootObj['@id'] } }).toArray()
211211
//The root object is a version, prepend it in
212212
ls_versions.unshift(rootObj)
213213
return ls_versions

0 commit comments

Comments
 (0)