fix(download): warn on same scan and url link
All checks were successful
Release to Staging / build_and_release (push) Successful in 59s

Fix #164
This commit is contained in:
enes 2025-01-17 10:24:19 +01:00
parent a9c5c3d18a
commit 599c29b4c4

View File

@ -625,11 +625,13 @@ const Download = ({
// Check the malware scan url // Check the malware scan url
// if it's valid URL // if it's valid URL
// if it contains sha256 // if it contains sha256
// if it differs from download link
setShowCanNotice( setShowCanNotice(
!( !(
malwareScanLink && malwareScanLink &&
isValidUrl(malwareScanLink) && isValidUrl(malwareScanLink) &&
/\b[a-fA-F0-9]{64}\b/.test(malwareScanLink) /\b[a-fA-F0-9]{64}\b/.test(malwareScanLink) &&
malwareScanLink !== url
) )
) )
}) })