News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[4868] Question Verification Bug On Registration

Started by Xarcell, April 09, 2011, 03:44:56 PM

Previous topic - Next topic

Xarcell

SMF 2.0RC5

In question verifications on registration, the answer cannot be "0". It can be "zero", but not "0", otherwise it returns an error saying the guest did not answer the questions properly...

If this bug has already been reported, I apologize. I don't have the time to spend looking for it.


Arantor

Yes, this is well known.

Cause is an empty() check in Subs-Editor.
Holder of controversial views, all of which my own.


emanuele

Should this be considered a bug and fixed?

If so probably:
Code (find) Select
if (empty($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]) || trim($smcFunc['htmlspecialchars'](strtolower($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]))) != strtolower($row['answer']))
Code (replace with) Select
if (!isset($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]) || trim($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]) == '' || trim($smcFunc['htmlspecialchars'](strtolower($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]))) != strtolower($row['answer']))
in Subs-Editor.php should work ans considering only empty answers as invalid.

Or "by design" and kept as it is?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Norv

No, just an oversight. I remember fixing this long ago... I must have forgotten to commit the fix, oops. Or, it's gremlins!

Ema, please feel free to kill it.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Joshua Dickerson

Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

emanuele

Quote from: Norv on November 12, 2011, 12:38:07 PM
Ema, please feel free to kill it.
Only a doubt, is it enough:
trim($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]) == ''
or better:
trim($smcFunc['htmlspecialchars']($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']])) == ''

Quote from: Joshua Dickerson on November 12, 2011, 09:04:33 PM
Norv, is it tracked?
Don't think so.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Joshua Dickerson

We should track these things (even if we have the fix in hand) so we can measure how much we've done.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

emanuele



Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: