summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2019-08-14 22:04:24 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2019-08-14 22:04:24 +0200
commitd7accfe7405c5132fd193d027b4da6698d5c2eda (patch)
tree3f609aaac18b75dfad7710d06e3d3993a18d4c24
parent58fd1fb2d228ef5e8cecbe4bdf6dabe6b3ccf457 (diff)
Allow specifying minimum positives for virustotal results
-rwxr-xr-xfbin/fbin.py2
1 files changed, 1 insertions, 1 deletions
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/<hash:hash>/<path:filename>', 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):