From fbf08ba0446de241aa5f5faee7878e9cee80aeac Mon Sep 17 00:00:00 2001 From: Fornax Date: Tue, 22 Feb 2022 20:00:23 +0100 Subject: [PATCH] More download captcha checks --- svelte/src/file_viewer/Downloader.svelte | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/svelte/src/file_viewer/Downloader.svelte b/svelte/src/file_viewer/Downloader.svelte index 9bd6678..db005ad 100644 --- a/svelte/src/file_viewer/Downloader.svelte +++ b/svelte/src/file_viewer/Downloader.svelte @@ -58,6 +58,12 @@ export const download_file = () => { } else if (file.availability === "virus_detected_captcha_required") { captcha_type = "malware" captcha_window_title = "Malware warning!" + } else if ( + file.availability === "ip_download_limited_captcha_required" || + file.availability === "ip_transfer_limited_captcha_required" + ) { + captcha_type = "ip_rate_limit" + captcha_window_title = "IP address rate limited" } if (load_captcha_script) { @@ -95,6 +101,11 @@ export const download_list = () => { You can continue downloading this file at your own risk, but you will have to prove that you're a human first.

+ {:else if captcha_type === "ip_rate_limit"} +

+ A lot of downloads have originated from this IP address lately. + Please prove that you are not a robot: +

{/if}