Page 1 of 2

All Captchas fail

Posted: 19 Jul 2015, 21:35
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

Re: All Captchas fail

Posted: 20 Jul 2015, 23:52
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;

Re: All Captchas fail

Posted: 23 Jul 2015, 23:53
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

Re: All Captchas fail

Posted: 26 Jul 2015, 17:01
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

Re: All Captchas fail

Posted: 26 Jul 2015, 20:44
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

Re: All Captchas fail

Posted: 27 Jul 2015, 17:51
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?

Re: All Captchas fail

Posted: 29 Jul 2015, 09:09
by Jan
Hi, hmmm, then it seems, this is not a cache problem. Can I see the site where this occurs?

Jan

Re: All Captchas fail

Posted: 29 Jul 2015, 21:49
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.

Re: All Captchas fail

Posted: 29 Jul 2015, 22:12
by Benno
Hi,
mmmmhhhh, bei mir hats funktioniert.... :idea: Image

Freundliche Grüße,
Benno

Re: All Captchas fail

Posted: 30 Jul 2015, 17:35
by brandstetter
But it does not work generally. Occasionally it did work for me too. But in over 80% it fails. Try it again.