From dc29d6bb6118e2b6d30585b5bee7c5030beb262e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 2 May 2024 13:25:27 +0200 Subject: [PATCH] chg: rename setting enable_ignore_sri -> ignore_sri --- config/generic.json.sample | 4 ++-- website/web/__init__.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/generic.json.sample b/config/generic.json.sample index a43bd08..97bfaf2 100644 --- a/config/generic.json.sample +++ b/config/generic.json.sample @@ -13,7 +13,7 @@ "days": 0, "hours": 0 }, - "enable_ignore_sri": false, + "ignore_sri": false, "async_capture_processes": 1, "use_user_agents_users": false, "enable_default_blur_screenshot": false, @@ -114,6 +114,6 @@ "max_tree_create_time": "The max time the generation of a tree is allowed to take", "s3fs": "The config to access a S3FS instance with the s3fs python module - it is not integrated properly for now as it requires urllib < 2.0 which is a non-started at this stage.", "index_everything": "If true, index every capture, even if it's not public. This feature requires a dedicated kvrocks instance, and is only accessible when logged-in as admin.", - "enable_ignore_sri": "If true, the sri values are ignored and not calculated so that there are no problems while developing and testing." + "ignore_sri": "If true, the sri values are ignored and not calculated so that there are no problems while developing and testing." } } diff --git a/website/web/__init__.py b/website/web/__init__.py index f1cee15..7a5585a 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -139,7 +139,7 @@ blur_screenshot = get_config('generic', 'enable_default_blur_screenshot') use_own_ua = get_config('generic', 'use_user_agents_users') enable_mail_notification = get_config('generic', 'enable_mail_notification') -enable_ignore_sri = get_config('generic', 'enable_ignore_sri') +ignore_sri = get_config('generic', 'ignore_sri') if enable_mail_notification: confirm_message = get_config('generic', 'email').get('confirm_message') else: @@ -183,7 +183,7 @@ app.jinja_env.globals.update(month_name=month_name) def get_sri(directory: str, filename: str) -> str: - if enable_ignore_sri: + if ignore_sri: return "" sha512 = sri_load()[directory][filename] return f'integrity=sha512-{sha512}' @@ -1180,7 +1180,7 @@ def tree(tree_uuid: str, node_uuid: str | None=None) -> Response | str | Werkzeu screenshot_size=screenshot_size, meta=meta, enable_mail_notification=enable_mail_notification, enable_monitoring=lookyloo.monitoring_enabled, - ignore_sri_enable=enable_ignore_sri, + ignore_sri=ignore_sri, monitoring_settings=lookyloo.monitoring_settings if lookyloo.monitoring_enabled else None, monitoring_collections=monitoring_collections if lookyloo.monitoring_enabled else [], enable_context_by_users=enable_context_by_users,