From f410b08eccf199456422bb361ef7a5f5c6799504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 14 Feb 2025 14:02:58 +0100 Subject: [PATCH] fix: revert last changes, properly fix pandrora submit for DL file --- website/web/__init__.py | 3 --- website/web/templates/hostname_popup.html | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/website/web/__init__.py b/website/web/__init__.py index e40806e0..7237ddd9 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -687,9 +687,6 @@ def normalize_known_content(h: str, /, known_content: dict[str, Any], url: URLNo 'url_object': url, } - if hasattr(url, 'downloaded_file') and url.downloaded_file: - url.add_feature('downloaded_file_hash', hashlib.sha512(url.downloaded_file.getvalue()).hexdigest()) - if not url.empty_response: # Index lookup # %%% Full body %%% diff --git a/website/web/templates/hostname_popup.html b/website/web/templates/hostname_popup.html index b99065c2..2c230230 100644 --- a/website/web/templates/hostname_popup.html +++ b/website/web/templates/hostname_popup.html @@ -292,7 +292,7 @@

{% if has_pandora %}
Downloaded file: {{url['url_object'].downloaded_filename}} ({{sizeof_fmt(url['url_object'].downloaded_file.getbuffer().nbytes)}})
- {{ pandora_submit(tree_uuid, url['url_object'].uuid, url['url_object'].downloaded_file_hash) }} + {{ pandora_submit(tree_uuid) }} {% else %} Download {{url['url_object'].downloaded_filename}}