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
|
||||
response: response
|
||||
timeout: @timeout
|
||||
@captchas.sort (a, b) -> a.timeout - b.timeout
|
||||
@count()
|
||||
@destroy()
|
||||
@setup false, true
|
||||
|
||||
@ -183,6 +183,7 @@ Captcha.v2 =
|
||||
@captchas.push
|
||||
response: token or $('textarea', @nodes.container).value
|
||||
timeout: Date.now() + @lifetime
|
||||
@captchas.sort (a, b) -> a.timeout - b.timeout
|
||||
$.set 'captchas', @captchas
|
||||
@count()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user