Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Bug in revised version of MATH CAPTCHA  (Read 11205 times)

bikoz

  • Jr. Member
  • **
  • Karma: 3
  • Posts: 66
Bug in revised version of MATH CAPTCHA
« on: February 19, 2009, 11:31:06 AM »

The new version of MATH CAPTCHA (adapted from 1.7) for version 1.6 DOES NOT work. The checkMathCaptcha() function is defined but is NOT USED anywhere in the code.

We need to change lines 322, 639 and 859 (relative to latest 1.6 download version):

Replace mathCaptcha($_POST['calc'], $_POST['sum'])
with  checkMathCaptcha($_POST['calc'], $_POST['sum'])

In addition, we need to change the function definition at line 1977:

function checkMathCaptcha($inSum = '', $inCalc = '') {

should become:
function checkMathCaptcha($inCalc = '', $inSum = '') {

Hope this helps...

Please let me know if I'm wrong.
Logged

bikoz

  • Jr. Member
  • **
  • Karma: 3
  • Posts: 66
Re: Bug in revised version of MATH CAPTCHA
« Reply #1 on: February 21, 2009, 06:17:07 PM »

If you want to konw if your 1.6 code is affected by the bug, you can test the captcha with any unlikely number, say 123 or 999. By the way, you can even test with letters...

If such values work, you know the drill!

But don't panic: there no security threat. Only the CAPTCHA itself is affected.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Bug in revised version of MATH CAPTCHA
« Reply #2 on: May 03, 2009, 09:38:30 PM »

If you want to konw if your 1.6 code is affected by the bug, you can test the captcha with any unlikely number, say 123 or 999. By the way, you can even test with letters... If such values work, you know the drill! ......... But don't panic: there is no security threat. Only the CAPTCHA itself is affected.

@ Bikoz... thanks. Actually, while testing this I noticed you could also leave the captcha field empty and still proceed. I've patched the official download ZIP with this patch today.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: Bug in revised version of MATH CAPTCHA
« Reply #3 on: May 03, 2009, 10:53:55 PM »

You're right bikoz.

The official version contains 2 versions, one is correct and other is not correct like you report.

We will correct this fast.

Thanks
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Bug in revised version of MATH CAPTCHA
« Reply #4 on: May 03, 2009, 11:05:43 PM »

You're right bikoz. - We will correct this fast. Thanks

It's already done Rui Mendes... (and Bikoz's post is a couple months old).  ;D
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU