i we use image_captcha module for all authentification (image is default), we have (drupal 6.13 on Debian Gnu/linux Lenny and pgsql).

we ask 4 caracters with no sensitive case

- sometime image has more than 4 caracters inside, when it is like that the caracters are sticky. and often is a special caracter like @,#,$,... (10% of authentification)

- When site is in maintenance mode, image_captcha is not use only math captcha.

CommentFileSizeAuthor
#3 capchaex1.png2.07 KBAldoReset

Comments

soxofaan’s picture

Category: bug » support

1) can you show some examples of this? what degree of distortion are you using? which font? what are the enabled characters (standard latin characters or non-latin)? are all enabled characters supported by the font?

2) math challenge in maintenance mode is a feature, not a bug. To cite the code:

        // In offline mode, the image CAPTCHA does not work because the request
        // for the image itself won't succeed (only ?q=user is permitted for
        // unauthenticated users). We fall back to the Math CAPTCHA in that case.
        global $user;
        if (variable_get('site_offline', FALSE) && $user->uid == 0) {
          return captcha_captcha('generate', 'Math');
        }
soxofaan’s picture

Title: Some bugs » extra characters in image CAPTCHA

(better title)

AldoReset’s picture

StatusFileSize
new2.07 KB

one exemple in attach file

parameters are:
string: azertyuiopqsdfghjklmwxcvbn#$@€%§1234567890
Code lenght = 4
Font: built in
spacing: tight
color varation: none
distorsion level: low - 2.
noise level: 3

soxofaan’s picture

if you remove the special characters (#$@€%§), do you get normal behavior?
or even further: if you only use numbers as enabled characters?

Is it on a live site? I'd like to see more examples.

AldoReset’s picture

yep is a live site:

www.placenet.org

eMPee584’s picture

Title: extra characters in image CAPTCHA » missing/extra characters in image CAPTCHA
Version: 6.x-2.0-rc2 » 6.x-2.x-dev
Category: support » bug

I have something similar - since a while, seldomly the first character is not rendered in the 3 char image captcha.. wtf? it's really strange...
my settings are

Array
(
    [image_captcha_image_allowed_chars] => aAbBCdEeFfGHhijKLMmNPQRrSTtWXYZ23456789%$#!@+?*
    [image_captcha_code_length] => 3
    [image_captcha_font] => sites/all/modules/captcha/image_captcha/fonts/skinck.ttf
    [image_captcha_font_size] => 40
    [image_captcha_character_spacing] => 1.5
    [image_captcha_background_color] => #000000
    [image_captcha_foreground_color] => #00a000
    [image_captcha_foreground_color_randomness] => 50
    [image_captcha_distortion_amplitude] => 6
    [image_captcha_bilinear_interpolation] => 1
    [image_captcha_dot_noise] => 0
    [image_captcha_line_noise] => 0
    [image_captcha_noise_level] => 5
)

i have set up a page for you to see it in action:
http://hfopi.org/captchaexamplesraw/image_captcha/Image/10
you can increase the number at the end to generate more but please don't go tooo far over the top ;)

soxofaan’s picture

Title: missing/extra characters in image CAPTCHA » extra characters in image CAPTCHA
soxofaan’s picture

Title: extra characters in image CAPTCHA » raise error when enabling non-latin2 characters with built-in font
Category: bug » feature
Priority: Normal » Minor

at AldoReset :
I think the problem is that you have the euro sign (and maybe the paragraph character "§" too) in your enabled characters and you use the PHP built-in font:
the euro sign is not valid for latin2 encoding (it requires something like utf8 encoding), but the PHP built-in font only works with latin2 encodable characters (see e.g. http:/php.net/manual/en/function.imagestring.php).

You have two options:

  • remove the euro sign (and the "§" too) from the list of enabled characters
  • use a uploaded TTF font instead of the built in font.

Please try both options and report the results for future reference.

I also feel a feature request coming up: raise error when using non-latin2 character set with built-in font (there is already be a warning/info message when using built-in font, but raising an error is better)

AldoReset’s picture

all seems ok after change string captcha image....

eMPee584’s picture

@aldoreset: it might be that this error is more often triggered on certain characters than on others.. (?!)
could you tell us from which to which allowed characters you changed?

soxofaan’s picture

you can find the Latin2 character set (aka ISO 8859-2) at http://en.wikipedia.org/wiki/ISO/IEC_8859-2,
so if you only use the normal English characters a-z, A-Z and numbers, you should be safe

Also note that it is not a good idea to enable fancy characters in your image CAPTCHAs anyway: your visitors have to be able to recognize them and enter them with their keyboard.

soxofaan’s picture

Status: Active » Fixed

added check for non latin2 character when built in font is used
http://drupal.org/cvs?commit=256830

gobioasis’s picture

Category: feature » bug
Status: Fixed » Needs work

I've same problem :

image_captcha
characters : ФЦУЖЭНГГШҮЗКЪПДЛОРХАӨБЫЙЯЧЁСМИИТЬВЮ (mongolian cyrillic)

it doesnt recognize & match the user inserted code.

soxofaan’s picture

Category: bug » feature
Status: Needs work » Fixed

at shuvuu in #13: from your description it looks like your problem has nothing to do with this issue. Please open a new issue and describe more thoroughly. For example: do standard Latin2 characters (A-Z) work? What do you mean with "recognize & match"? Do the Cyrillic characters show up properly in the image? Etcetera.

eMPee584’s picture

soxofaan: i think #13 is about the bounding box issue. Please consider committing my fix from #349218: Sometimes first character of image CAPTCHA is invisible: weird bug in PHP's bounding box calculation, it really adds just one integer comparision per character as overhead.

gobioasis’s picture

Latin2 characters (A-Z) work,
cyrillic characters don't work,
cyrillic characters shown in image.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.