News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[BUG - 1.1 RC3] request another captcha image

Started by Harzem, August 22, 2006, 04:42:52 AM

Previous topic - Next topic

Harzem

In SMF 1.1 RC3, "Request another image" link in registration doesn't work for FireFox (tested in 1.5.0.6)

niko

#1
It does work but it is always same. Some times one of images doesn't show up, pressing it will help but it won't change. I think it's not meant to change code but layout of them if they are unreadable. So it's useless if theres no gd.

BonEcho (aka Firefox) 2.0 Beta 2

By the way captcha is not very strong since without gd every image is same so automatic bot could do simple crc check. So it
Websites: Madjoki || (2 links retracted by team, links out of date and taken over.)
Mods: SMF Arcade, Related topics, SMF Project Tools, Post History

WIP Mods: Bittorrent Tracker || SMF Wiki

Thantos

I tested it with 1.5.0.6 and it works, so I'll need a link to your particular forum to find out whats going on.

Harzem

http://www.harzem.com/test/rc3/index.php

But it doesn't look like working in other RC3 sites also. I've tried three computers, two are XP and one is Win98. Still no luck. (Only FF of course)

H

Quote from: Thantos on August 22, 2006, 07:56:02 AM
I tested it with 1.5.0.6 and it works, so I'll need a link to your particular forum to find out whats going on.

Mike, just tested this with 1.1 CVS (todays) on my site and it is failing for me on IE and FFx.
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Thantos

HarzeM it worked for me using FF 1.5.0.6 on your site.

Harzem

The problem is not particularly my site. I don't know the reason, but more than a few people says it is not working, including huwnet. I think it is browser-based, but not browser version based.

I'll try looking at the code and find a intercompatible js code.

Thantos

Hmmm its possible that it's a caching issue also.  Since it's basically just asking for the same image again....

Thantos

Try this:
Find
Code (Register.template.php) Select

if ($context['visual_verification'])
{
echo '
function refreshImages()
{';
if ($context['use_graphic_library'])
echo '
document.getElementById("verificiation_image").src = "', $context['verificiation_image_href'], '";';
else
echo '
document.getElementById("verificiation_image_1").src = "', $context['verificiation_image_href'], ';letter=1";
document.getElementById("verificiation_image_2").src = "', $context['verificiation_image_href'], ';letter=2";
document.getElementById("verificiation_image_3").src = "', $context['verificiation_image_href'], ';letter=3";
document.getElementById("verificiation_image_4").src = "', $context['verificiation_image_href'], ';letter=4";
document.getElementById("verificiation_image_5").src = "', $context['verificiation_image_href'], ';letter=5";';
echo '
}';
}


replace with

if ($context['visual_verification'])
{
echo '
function refreshImages()
{
// Make sure we are using a new rand code.
var new_url = new String("', $context['verificiation_image_href'], '");
new_url = new_url.substr(0, new_url.indexOf("rand=") + 5);

// Quick and dirty way of converting decimal to hex
var hexstr = "0123456789abcdef";
for(var i=0; i < 32; i++)
new_url = new_url + hexstr.substr(Math.floor(Math.random() * 16), 1);';

if ($context['use_graphic_library'])
echo '
document.getElementById("verificiation_image").src = new_url;';
else
echo '
document.getElementById("verificiation_image_1").src = new_url + ";letter=1";
document.getElementById("verificiation_image_2").src = new_url + ";letter=2";
document.getElementById("verificiation_image_3").src = new_url + ";letter=3";
document.getElementById("verificiation_image_4").src = new_url + ";letter=4";
document.getElementById("verificiation_image_5").src = new_url + ";letter=5";';
echo '
}';
}


Tristan Perry

That fixed it, thanks Thantos :)




Also, I find that I cannot read over 50% of the images - the letters are generally unclear, and the static/dots  make things even harder to read. Even without the static/dots, one or two of the letters are too small/obscured to read, I find..

Harzem

#10
Quote from: Tau Online on August 22, 2006, 09:12:23 AM
That fixed it, thanks Thantos

Agreed :)

Quote from: Tau Online on August 22, 2006, 09:12:23 AM

Also, I find that I cannot read over 50% of the images - the letters are generally unclear, and the static/dots  make things even harder to read. Even without the static/dots, one or two of the letters are too small/obscured to read, I find..

Agreed :(

I've posted a PM to you, Thantos, and Compuart, about this captcha image (seen in CVS boards of team members). But never got a response. I thought the image is too hard to read. There are ways to make it easier to read by humans, and harder to read by robots.

B Patterson

#11
Another small bug with the CAPTCHA is that in Firefox 1.5.0.6 (Win XP) is that reading the letters doesn't work; however, in IE7beta3 the WMP Shim works perfectly for sounding the letters out.  Firefox just gives you a short clip of 1 letter/number, and not the full CAPTCHA.

I also seem to get this error message when dealing with the audible captcha:
Quote[Exception... "'Permission denied to get property XULElement.accessKey' when calling method: [nsIDOMXULLabelElement::accessKey]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http://domain.com/forum/Themes/default/script.js?rc2p :: reqWin :: line 99" data: no]

Haven't applied your patch yet THantos, but will later today I guess.

navjotjsingh

Quote from: Thantos on August 22, 2006, 08:53:00 AM
Try this:
Find
Code (Register.template.php) Select

if ($context['visual_verification'])
{
echo '
function refreshImages()
{';
if ($context['use_graphic_library'])
echo '
document.getElementById("verificiation_image").src = "', $context['verificiation_image_href'], '";';
else
echo '
document.getElementById("verificiation_image_1").src = "', $context['verificiation_image_href'], ';letter=1";
document.getElementById("verificiation_image_2").src = "', $context['verificiation_image_href'], ';letter=2";
document.getElementById("verificiation_image_3").src = "', $context['verificiation_image_href'], ';letter=3";
document.getElementById("verificiation_image_4").src = "', $context['verificiation_image_href'], ';letter=4";
document.getElementById("verificiation_image_5").src = "', $context['verificiation_image_href'], ';letter=5";';
echo '
}';
}


replace with

if ($context['visual_verification'])
{
echo '
function refreshImages()
{
// Make sure we are using a new rand code.
var new_url = new String("', $context['verificiation_image_href'], '");
new_url = new_url.substr(0, new_url.indexOf("rand=") + 5);

// Quick and dirty way of converting decimal to hex
var hexstr = "0123456789abcdef";
for(var i=0; i < 32; i++)
new_url = new_url + hexstr.substr(Math.floor(Math.random() * 16), 1);';

if ($context['use_graphic_library'])
echo '
document.getElementById("verificiation_image").src = new_url;';
else
echo '
document.getElementById("verificiation_image_1").src = new_url + ";letter=1";
document.getElementById("verificiation_image_2").src = new_url + ";letter=2";
document.getElementById("verificiation_image_3").src = new_url + ";letter=3";
document.getElementById("verificiation_image_4").src = new_url + ";letter=4";
document.getElementById("verificiation_image_5").src = new_url + ";letter=5";';
echo '
}';
}


It worked wonderfully for me also..earlier in FF 1.5.0.6 it did not worked even in my forum also!


adrianbj

Thanks Thantos - that hack fixed the image refresh problem in FF for me too.

The audio reading works fine for me in FF.

I also agree that some of the dotted backgrounds are a little hard to read, but now that the image refresh option is working, I am not too worried about it, although I think an alternative background might be better for the future.

Thanks,
Adrian

karlbenson

I've only got Rc3 on my test site atm.

But will these and other bug fixes be made fixed in the download pages, or it will it mean I have to fix it myself?   I'm pretty new to smf and this is the first upgrade I've gone through.

For me IE6 on a clean Rc3 install the image doesnt change. The captcha2speech works fine.

Lazybones

Quote from: bpat1434 on August 22, 2006, 10:13:09 AM
Another small bug with the CAPTCHA is that in Firefox 1.5.0.6 (Win XP) is that reading the letters doesn't work; however, in IE7beta3 the WMP Shim works perfectly for sounding the letters out.  Firefox just gives you a short clip of 1 letter/number, and not the full CAPTCHA.

I also seem to get this error message when dealing with the audible captcha:
Quote[Exception... "'Permission denied to get property XULElement.accessKey' when calling method: [nsIDOMXULLabelElement::accessKey]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http://domain.com/forum/Themes/default/script.js?rc2p :: reqWin :: line 99" data: no]

Haven't applied your patch yet THantos, but will later today I guess.

Running FF 2.0 Beta 1 I also have the short 1 letter clip issue. However the full alternate link does work, I suspect that some users will give up if they can't read the image then only get 1 letter out of the first audio prompt.

As already stated the letters are not human readably enough and need some tweaking.. If the over all size was increased it might help

dvk01

Why can't you set some user configuration of captcha as in the present mod in use on 1.2

I just can't & won't update to 1.3 yet on any of my forums until this is sorted as too many people won't be able to use it

I allow guest posting on certain boards so that won't
be possible with this unworkable captcha version

Harzem

#17
Hi everybody,

I'm working on a better captcha. Please have a look at this:
http://www.harzem.com/test/rc3/index.php?action=register
You can request another image to see different fonts and modifications.

- There are more fonts.
- Some fonts are negative images, i.e., white fonts inside dark borders.
- One font is a 3D looking one, and still a negative font.
- Fonts are rotated more
- Fonts are waved, so they are different each time.

(Click on the thumbnails below to see them larger!)

I'm willing to release this as a mod. If developers want to add this as default, I'm willing to give away.

joomla

#18
HarzeM,
I'm very interested in this... our upgrade is scheduled in less than 24 hrs, and I am having second thoughts about this registration CAPTCHA due to the size and visibility of the image.

Is this hack/mod easy to install?

edit: once this fix is installed.. I think we will cope.. been doing a bit more testing... ;)
Brad Baker
www.joomla.org - Core Team Member, Forum Admin http://forum.joomla.org
www.rochen.com - Managed Dedicated and Reseller Hosting Solutions.
www.joomlatutorials.com & .au - Learn Joomla! the easy way.

Tristan Perry

HarzeM I'd love that as a mod - I think it'd be really handy. I just had a bot register at my forums (when I had CAPTHCA disabled), however I find that with it enabled it makes human registration too hard.

Advertisement: