mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-01-12 22:43:20 -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 = {
|
||||
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()){
|
||||
rs.getString("token")
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user