Post by tomkirk23 » Thu May 24, 2012 11:58 pm

Hello -

This is kind of a minor issue that continues to bug me...

First of all, the Captcha display is just plain ugly. I would love to replace it entirely. Unfortunately, the only replacement option I can find is ReCaptcha - which is somehow uglier. If anyone has an alternative, I would love to hear about it.

Second, Captcha likes to commonly display a very odd looking pointed zero. But how is anyone to know it is not an "O" letter? Yes, you want the Captcha to be difficult enough for machines to have trouble with... but you certainly don't want humans to be baffled and enter the wrong code. When possible, I prefer to remove 0, O, 1, and l from the list of characters that the captcha displays. Is there anyway to do that with the OC Captcha?

Thank you.

Newbie

Posts

Joined
Wed Nov 09, 2011 11:14 pm

Post by JAY6390 » Fri May 25, 2012 9:00 am

Open /system/library/captcha.php

Find

Code: Select all

$this->code = substr(sha1(mt_rand()), 17, 6); 
replace with

Code: Select all

$this->code = substr(preg_replace('~[0o]+~i', '',sha1(mt_rand())), 17, 6); 
Untested but should work

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by tomkirk23 » Sun May 27, 2012 11:05 am

Jay: Much appreciated. Tested and working. No changes necessary. Thanks.

Newbie

Posts

Joined
Wed Nov 09, 2011 11:14 pm

Post by stonehinged » Sun Aug 05, 2012 10:50 am

Second that Jay! But I'm still seeing the number 1. (1.5.2.1)

STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/


User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:10 am
Location - US

Post by stonehinged » Sun Aug 05, 2012 10:55 am

Jay can confirm this, I'm just experimenting but I think the following edit:

Code: Select all

$this->code = substr(preg_replace('~[0o1il]+~i', '',sha1(mt_rand())), 17, 6);
will also remove "1, i, l" if desired.

STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/


User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:10 am
Location - US
Who is online

Users browsing this forum: No registered users and 17 guests