File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -913,6 +913,7 @@ def find_similar_files(sha256, **kwargs):
913
913
914
914
Arguments:
915
915
use_archive => Also find similar file in archive
916
+ archive_only => Only find similar in the malware archive
916
917
917
918
Data Block:
918
919
None
@@ -933,11 +934,14 @@ def find_similar_files(sha256, **kwargs):
933
934
"""
934
935
user = kwargs ['user' ]
935
936
use_archive = request .args .get ('use_archive' , 'false' ).lower () in ['true' , '' ]
937
+ archive_only = request .args .get ('use_archive' , 'false' ).lower () in ['true' , '' ]
936
938
937
- if use_archive and ROLES .archive_view not in user ['roles' ]:
939
+ if ( use_archive or archive_only ) and ROLES .archive_view not in user ['roles' ]:
938
940
return make_api_response ({}, "User is not allowed to view the archive" , 403 )
939
941
940
- if use_archive :
942
+ if archive_only :
943
+ index_type = Index .ARCHIVE
944
+ elif use_archive :
941
945
index_type = Index .HOT_AND_ARCHIVE
942
946
else :
943
947
index_type = Index .HOT
You can’t perform that action at this time.
0 commit comments