mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-01-27 13:03:12 -05:00
select a random captcha
This commit is contained in:
parent
fd5dcff335
commit
80ff9bfe6d
@ -89,7 +89,7 @@ class Captcha(throttle: Int) extends DBConn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def getChallenge(param: Parameters): Id = {
|
def getChallenge(param: Parameters): Id = {
|
||||||
val rs = stmt.executeQuery("SELECT token FROM challenge WHERE solved=FALSE LIMIT 1")
|
val rs = stmt.executeQuery("SELECT token FROM challenge WHERE solved=FALSE ORDER BY RAND() LIMIT 1")
|
||||||
val id = if(rs.next()){
|
val id = if(rs.next()){
|
||||||
rs.getString("token")
|
rs.getString("token")
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user