Fix #1675.
This commit is contained in:
parent
c3979d5459
commit
3e23d567ad
@ -1,3 +1,5 @@
|
||||
- The QR won't duplicate single-word captchas anymore if you've input numbers only (like a street address).
|
||||
|
||||
### 3.20.13 - *2014-05-09*
|
||||
|
||||
- [Security fix](https://github.com/MayhemYDG/4chan-x/issues/1634).
|
||||
|
||||
@ -61,9 +61,10 @@ QR.captcha =
|
||||
getOne: ->
|
||||
challenge = @nodes.img.alt
|
||||
response = @nodes.input.value.trim()
|
||||
if response and !/\s/.test response
|
||||
if response and !/\s|^\d+$/.test response
|
||||
# one-word-captcha:
|
||||
# If there's only one word, duplicate it.
|
||||
# If it's a number (street address), don't duplicate it.
|
||||
response = "#{response} #{response}"
|
||||
{challenge, response}
|
||||
load: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user