Update the captcha caching expiration date.

This commit is contained in:
Nicolas Stepien 2011-12-06 15:31:01 +01:00
parent c2e54a904b
commit ea4c581d2a
3 changed files with 6 additions and 4 deletions

View File

@ -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;

View File

@ -1,4 +1,6 @@
master
- aeosynth
update the captcha caching expiration date to 30mins
2.22.2
- mayhem

View File

@ -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