All Captchas fail

Phoca Guestbook - creating guestbooks in Joomla! CMS
brandstetter
Phoca Member
Phoca Member
Posts: 12
Joined: 19 Jul 2015, 14:02

All Captchas fail

Post by brandstetter »

Hi

I'm unable to use any captcha. As soon as I enable *any* of the captchas offered by the Phoca Guestbook control center, I'm no longer able to post any message. After posting a message Phoca Guestbook gives a warning "Warning: possible spam detected". The message is not saved.

However, if disable all captchas - without changing anything else, I'm able to post a message. What is wrong here?

regards Frank
brandstetter
Phoca Member
Phoca Member
Posts: 12
Joined: 19 Jul 2015, 14:02

Re: All Captchas fail

Post by brandstetter »

I did some research and found that phoca guestbook fails in line 39 of file phocaguestbookcaptcha.php. I was using hnCaptcha. And it fails with both: Firefox and iExplore. Unfortunately I've no clue why it fails. Why is there no expected value for the captcha? Maybe some knowleadgeable user can have a look into this?

Code: Select all

		$captchaId = $session->get('captcha_id',     null, $namespace);
		$value_exp = $session->get('captcha_result', null, $namespace);
		$session->clear('captcha_id',     $namespace);
		$session->clear('captcha_result', $namespace);
						
		switch ($captchaId) {
			default:
			case 1: //COM_PHOCAGUESTBOOK_JOOMLA_CAPTCHA -> do not use this check
				return new JException(JText::_('COM_PHOCAGUESTBOOK_POSSIBLE_SPAM_DETECTED' ), "105", E_USER_ERROR, $info, false);
				break;
			case 2: //COM_PHOCAGUESTBOOK_STANDARD_CAPTCHA
			case 3: //COM_PHOCAGUESTBOOK_MATH_CAPTCHA
			case 4: //COM_PHOCAGUESTBOOK_TTF_CAPTCHA
			case 6: //COM_PHOCAGUESTBOOK_EASYCALC_CAPTCHA
			case 8: //COM_PHOCAGUESTBOOK_HN_CAPTCHA

				if (!$value_exp) {
here ==> 		return new JException(JText::_('COM_PHOCAGUESTBOOK_POSSIBLE_SPAM_DETECTED' ), "105", E_USER_ERROR, $info, false);
				} else if (!$value) {
					return new JException(JText::_('COM_PHOCAGUESTBOOK_WRONG_CAPTCHA' ), "105", E_USER_ERROR, $info, false);
				} else if ($value != $value_exp) {
					return new JException(JText::_('COM_PHOCAGUESTBOOK_WRONG_CAPTCHA' ), "105", E_USER_ERROR, $info, false);
				}
				break;
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: All Captchas fail

Post by Jan »

Hi, which Phoca Guestbook version you are using? Can you pleas paste full path to the file where it fails?

I am looking at it and see no such code in the file :idea:

Jan
If you find Phoca extensions useful, please support the project
brandstetter
Phoca Member
Phoca Member
Posts: 12
Joined: 19 Jul 2015, 14:02

Re: All Captchas fail

Post by brandstetter »

Hello Jan

Thank you for your reply. I'm using com_phocaguestbook_v3.0.4. The file is /public_html/cms2/components/com_phocaguestbook/models/rules/phocaguestbookcapthcha.php. It fails in line 39 of this file.

regards Frank
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: All Captchas fail

Post by Jan »

Hi, this means, the captcha code was added wrong? Did you try to test to disable cache? Maybe some problem with cache? :idea:

Jan
If you find Phoca extensions useful, please support the project
brandstetter
Phoca Member
Phoca Member
Posts: 12
Joined: 19 Jul 2015, 14:02

Re: All Captchas fail

Post by brandstetter »

I didn't enable caching, so I don't think caching is enabled somehow.
The plugin "System - Seitencache" ("System - pagecache") is disabled. Are there any other places, where caching could be enabled?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: All Captchas fail

Post by Jan »

Hi, hmmm, then it seems, this is not a cache problem. Can I see the site where this occurs?

Jan
If you find Phoca extensions useful, please support the project
brandstetter
Phoca Member
Phoca Member
Posts: 12
Joined: 19 Jul 2015, 14:02

Re: All Captchas fail

Post by brandstetter »

Yes. It is www.frank-beris.de/cms2/guestbook
You can try to post a message and you will see, that all trials fail with the mentioned warning.
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9961
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: All Captchas fail

Post by Benno »

Hi,
mmmmhhhh, bei mir hats funktioniert.... :idea: Image

Freundliche Grüße,
Benno
brandstetter
Phoca Member
Phoca Member
Posts: 12
Joined: 19 Jul 2015, 14:02

Re: All Captchas fail

Post by brandstetter »

But it does not work generally. Occasionally it did work for me too. But in over 80% it fails. Try it again.
Post Reply