Update the captcha caching expiration date.
This commit is contained in:
parent
c2e54a904b
commit
ea4c581d2a
@ -1620,10 +1620,10 @@
|
|||||||
content = $('textarea', qr.el).value || $('input[type=file]', qr.el).files.length;
|
content = $('textarea', qr.el).value || $('input[type=file]', qr.el).files.length;
|
||||||
if (!content) return 'Error: No text entered.';
|
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.
|
before then, b/c posting takes time.
|
||||||
*/
|
*/
|
||||||
cutoff = Date.now() - 5 * HOUR + 5 * MINUTE;
|
cutoff = Date.now() - 25 * MINUTE;
|
||||||
captchas = $.get('captchas', []);
|
captchas = $.get('captchas', []);
|
||||||
while (captcha = captchas.shift()) {
|
while (captcha = captchas.shift()) {
|
||||||
if (captcha.time > cutoff) break;
|
if (captcha.time > cutoff) break;
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
master
|
master
|
||||||
|
- aeosynth
|
||||||
|
update the captcha caching expiration date to 30mins
|
||||||
|
|
||||||
2.22.2
|
2.22.2
|
||||||
- mayhem
|
- mayhem
|
||||||
|
|||||||
@ -1255,11 +1255,11 @@ qr =
|
|||||||
return 'Error: No text entered.' unless content
|
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.
|
before then, b/c posting takes time.
|
||||||
###
|
###
|
||||||
|
|
||||||
cutoff = Date.now() - 5*HOUR + 5*MINUTE
|
cutoff = Date.now() - 25*MINUTE
|
||||||
captchas = $.get 'captchas', []
|
captchas = $.get 'captchas', []
|
||||||
while captcha = captchas.shift()
|
while captcha = captchas.shift()
|
||||||
if captcha.time > cutoff
|
if captcha.time > cutoff
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user