From d7accfe7405c5132fd193d027b4da6698d5c2eda Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 14 Aug 2019 22:04:24 +0200 Subject: Allow specifying minimum positives for virustotal results --- fbin/fbin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fbin/fbin.py b/fbin/fbin.py index d3065e2..983c1aa 100755 --- a/fbin/fbin.py +++ b/fbin/fbin.py @@ -187,7 +187,7 @@ def uploaded(hash): @app.route('/file//', endpoint = 'file') def _file(hash, ext=None, filename=None): f = get_file(hash) - if not f or f.blocked_reason: + if not f or (f.blocked_reason and f.blocked_reason['positives'] >= current_app.config['VIRUSTOTAL_MINIMUM_POSITIVES']): abort(404) path = storage.get_file(f) if isinstance(path, Response): -- cgit v1.2.3