Page 1 of 1

Spam Protector plugin - CAPTCHA case sensitivity

Posted: Wed Jul 22, 2009 11:52 pm
by akremedy
I fear I must have overlooked something, but cannot seem to find a variable/config setting anywhere that controls case sensitivity in CAPTCHA strings for the Spam Protector plugin.

By default, it seems that Spam Protector expects all upper-case text, however entered as such, the string is not validated.

I remedied this easily enough by modifying the CAPTCHA alpha character array to lower case:

Code: Select all

$this->chars = array_merge($this->chars, array('a','b','c','d','e','f','h','j','k','m','n','p','r','t','u','v','w','x','y','z'));
I doubt I'll change it now, but I'm curious to know what I might be missing...

Thanks,
Adam

Re: Spam Protector plugin - CAPTCHA case sensitivity

Posted: Thu Jul 23, 2009 5:09 pm
by garvinhicking
Hi!

The comparison of the captcha string is actually case independent:

Code: Select all

... || strtolower($serendipity['POST']['captcha']) != strtolower($_SESSION['spamblock']['captcha'])) {
so this shouldn't matter at all what the user uses for the case...

Regards,
Garvin

Re: Spam Protector plugin - CAPTCHA case sensitivity

Posted: Thu Jul 23, 2009 6:09 pm
by akremedy
Thanks Garvin, yes this made it all the stranger - I spotted where it looks like everything is converted strtolower, but still, CAPTCHA fails with upper, and passes with lower.

If I can, I'll look into it a little further, but it could be awhile before I get around to it...if this was affecting everyone, surely there would be plenty of reports already, and I didn't find anything in the forums; therefore, until proven otherwise, I'm assuming it's something odd with my install/configuration.

Thanks,
Adam