CAPTCHA on D-6.10 display math question although set up to display image .

Comments

soxofaan’s picture

Component: Image Captcha (image_captcha) » Captcha API (captcha)

Can you give some more information: on which form did you set the CAPTCHA?

pobster’s picture

Virgin install - same issue. Stock forms for log in set to image captcha yet seeing math questions instead.

form_id 	module 	type
comment_form 	image_captcha 	Image
contact_mail_user 	image_captcha 	Image
contact_mail_page 	image_captcha 	Image
user_register 	image_captcha 	Image
user_pass 	image_captcha 	Image
user_login 	image_captcha 	Image
user_login_block 	NULL 	NULL
guestbook_form_entry_form 	image_captcha 	Image

Db looks fine?

Pobster

soxofaan’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

I can't reproduce with a virgin install of Drupal 6.10 and CAPTCHA/image CAPTCHA 6.x-1.0-rc2

Could this be some caching problem on your setups?

pobster’s picture

Okay I've narrowed this down somewhat although haven't had time to debug it any... Seems the issue is specific to multisites - so sites/default works fine and sites/somethingelse.com shows math question rather than image captcha.

Pobster

pobster’s picture

Okay... Found out how to reproduce this although I didn't bother to check that it's anything to do with multisites... If your site is offline the log in page will not show the image captcha only the math one. When the site is online again, the image captcha shows just fine again.

Pobster

soxofaan’s picture

Title: Image CAPTCHA in offline mode: math challenge displayed instead (feature, not a bug) » Math question display instead of image

Aha, this is not a bug, but a feature.

In offline mode, the image CAPTCHA module falls back on math CAPTCHA because the CAPTCHA image request can not be served.

To quote image_captcha.module:

function image_captcha_captcha($op, $captcha_type='', $arg3='') {
...
      if ($captcha_type == 'Image') {
        // 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');
        }
...

edit: typo

soxofaan’s picture

Title: Math question display instead of image » Image CAPTCHA in offline mode: math challenge displayed instead (feature, not a bug)
Status: Postponed (maintainer needs more info) » Fixed

better title and a link to the original issue: #133548: Image not available when site is offline for maintenance

Title: Math question display instead of image » Image CAPTCHA in offline mode: math challenge displayed instead (feature, not a bug)
Status: Fixed » Closed (fixed)

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