From 599c29b4c4004e7f9a8b3043fd62eeba1fc930bc Mon Sep 17 00:00:00 2001 From: enes Date: Fri, 17 Jan 2025 10:24:19 +0100 Subject: [PATCH] fix(download): warn on same scan and url link Fix #164 --- src/pages/mod/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/mod/index.tsx b/src/pages/mod/index.tsx index e852df6..5b97147 100644 --- a/src/pages/mod/index.tsx +++ b/src/pages/mod/index.tsx @@ -625,11 +625,13 @@ const Download = ({ // Check the malware scan url // if it's valid URL // if it contains sha256 + // if it differs from download link setShowCanNotice( !( malwareScanLink && isValidUrl(malwareScanLink) && - /\b[a-fA-F0-9]{64}\b/.test(malwareScanLink) + /\b[a-fA-F0-9]{64}\b/.test(malwareScanLink) && + malwareScanLink !== url ) ) })