diff --git a/CHANGELOG.md b/CHANGELOG.md index 2274cface..bb6c5657f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). diff --git a/src/Posting/QR.captcha.coffee b/src/Posting/QR.captcha.coffee index 8ecd95300..29d6e5822 100644 --- a/src/Posting/QR.captcha.coffee +++ b/src/Posting/QR.captcha.coffee @@ -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: ->