Use captchas closer to expiring first. #618
This commit is contained in:
parent
bb32e6eaa5
commit
8f88c58a99
@ -154,6 +154,7 @@ Captcha.v1 =
|
|||||||
challenge: @nodes.img.alt
|
challenge: @nodes.img.alt
|
||||||
response: response
|
response: response
|
||||||
timeout: @timeout
|
timeout: @timeout
|
||||||
|
@captchas.sort (a, b) -> a.timeout - b.timeout
|
||||||
@count()
|
@count()
|
||||||
@destroy()
|
@destroy()
|
||||||
@setup false, true
|
@setup false, true
|
||||||
|
|||||||
@ -183,6 +183,7 @@ Captcha.v2 =
|
|||||||
@captchas.push
|
@captchas.push
|
||||||
response: token or $('textarea', @nodes.container).value
|
response: token or $('textarea', @nodes.container).value
|
||||||
timeout: Date.now() + @lifetime
|
timeout: Date.now() + @lifetime
|
||||||
|
@captchas.sort (a, b) -> a.timeout - b.timeout
|
||||||
$.set 'captchas', @captchas
|
$.set 'captchas', @captchas
|
||||||
@count()
|
@count()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user