This commit is contained in:
Mayhem 2014-06-13 01:36:19 +02:00
parent c3979d5459
commit 3e23d567ad
2 changed files with 4 additions and 1 deletions

View File

@ -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).

View File

@ -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: ->