From 32f35ebcca691555359c2a83bc056638a8e17a6c Mon Sep 17 00:00:00 2001 From: enes Date: Fri, 17 Jan 2025 12:49:34 +0100 Subject: [PATCH] revert: scan link early return Refs: fbde15e075d92bf4070b75f5decc554ca18db02e. --- src/pages/mod/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/mod/index.tsx b/src/pages/mod/index.tsx index 2a25934..5b97147 100644 --- a/src/pages/mod/index.tsx +++ b/src/pages/mod/index.tsx @@ -622,17 +622,13 @@ const Download = ({ const isFile = await checkUrlForFile(url) setShowNotice(!isFile) - if (!malwareScanLink) { - setShowCanNotice(true) - return - } - // 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) && malwareScanLink !== url