From ea4c581d2ab4a4255b7cb202b1ad910808726b29 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 6 Dec 2011 15:31:01 +0100 Subject: [PATCH] Update the captcha caching expiration date. --- 4chan_x.user.js | 4 ++-- changelog | 2 ++ script.coffee | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 75474c209..fc0916eea 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1620,10 +1620,10 @@ content = $('textarea', qr.el).value || $('input[type=file]', qr.el).files.length; if (!content) return 'Error: No text entered.'; /* - captchas expire after 5 hours (emperically verified). cutoff 5 minutes + captchas expire after 30 minutes (emperically verified). cutoff 5 minutes before then, b/c posting takes time. */ - cutoff = Date.now() - 5 * HOUR + 5 * MINUTE; + cutoff = Date.now() - 25 * MINUTE; captchas = $.get('captchas', []); while (captcha = captchas.shift()) { if (captcha.time > cutoff) break; diff --git a/changelog b/changelog index 8193a1627..a63d81432 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- aeosynth + update the captcha caching expiration date to 30mins 2.22.2 - mayhem diff --git a/script.coffee b/script.coffee index c01cc134d..863d8646c 100644 --- a/script.coffee +++ b/script.coffee @@ -1255,11 +1255,11 @@ qr = return 'Error: No text entered.' unless content ### - captchas expire after 5 hours (emperically verified). cutoff 5 minutes + captchas expire after 30 minutes (emperically verified). cutoff 5 minutes before then, b/c posting takes time. ### - cutoff = Date.now() - 5*HOUR + 5*MINUTE + cutoff = Date.now() - 25*MINUTE captchas = $.get 'captchas', [] while captcha = captchas.shift() if captcha.time > cutoff