revert: scan link early return
Refs: fbde15e075d92bf4070b75f5decc554ca18db02e.
This commit is contained in:
parent
fbde15e075
commit
32f35ebcca
@ -622,17 +622,13 @@ const Download = ({
|
|||||||
const isFile = await checkUrlForFile(url)
|
const isFile = await checkUrlForFile(url)
|
||||||
setShowNotice(!isFile)
|
setShowNotice(!isFile)
|
||||||
|
|
||||||
if (!malwareScanLink) {
|
|
||||||
setShowCanNotice(true)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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
|
// if it differs from download link
|
||||||
setShowCanNotice(
|
setShowCanNotice(
|
||||||
!(
|
!(
|
||||||
|
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
|
malwareScanLink !== url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user