Skip to content

Commit c1605f4

Browse files
authored
Update web_utils.py
1 parent 910919d commit c1605f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cuckoo/common/web_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,14 +1402,14 @@ def perform_search(
14021402
if term in hash_searches:
14031403
# The file details are uniq, and we store 1 to many. So where hash type is uniq, IDs are list
14041404
split_by = "," if "," in query_val else " "
1405-
query_val = {"$in": [val.strip() for val in query_val.split(split_by)]}
1405+
query_filter_list = {"$in": [val.strip() for val in query_val.split(split_by)]}
14061406
pipeline = [
14071407
# Stages 1-5: Find, unwind, group, sort, limit IDs
14081408
{"$match": {hash_searches[term]: query_filter_list}},
14091409
{"$unwind": "$_task_ids"},
14101410
{"$group": {"_id": "$_task_ids"}},
14111411
{"$sort": {"_id": -1}},
1412-
{"$limit": limit},
1412+
{"$limit": search_limit},
14131413
# Stage 6: Join with the tasks collection
14141414
{"$lookup": {"from": "analysis", "localField": "_id", "foreignField": "info.id", "as": "task_doc"}},
14151415
# Stage 7: Unpack the joined doc

0 commit comments

Comments
 (0)