ZF-9531: Incorrect headers when used with other services.

Issue Type: Bug Created: 2010-03-24T09:25:50.000+0000 Last Updated: 2012-11-28T11:59:46.000+0000 Status: Resolved Fix version(s): - 1.12.1 (18/Dec/12)

Reporter: Dustin Sweigart (dustins) Assignee: Christer Edvartsen (cogo) Tags: - Zend_Service_ReCaptcha

Related issues: Attachments:


I was using this after I ran akismet to check for spam and was getting errors. The problem was that headers set by akismet were not reset before recaptcha sent it's request. This can cause unexpected results or errors. What was actually happening in my instances is the Host header was not reset and the recaptcha server wouldn't respond to the incorrect domain.

I noticed this happening in 1.7.4 and it seemed to be a problem up until at least 1.10


Posted by Christer Edvartsen (cogo) on 2012-11-20T22:50:41.000+0000

@Rob I can have a look a this in a couple of days if it's an issue we want to fix. The issue might be present in ZendService_ReCaptcha as well. Shall I see if I can fix it?

Posted by Rob Allen (rob) on 2012-11-21T07:05:38.000+0000

Yes please!

Posted by Christer Edvartsen (cogo) on 2012-11-21T11:43:26.000+0000

Shall I do the commit(s) against trunk and then merge them into the release-1.11 branch? I haven't been doing any contributions in ZF1 for ages, so don't really remember the flow.

Posted by Rob Allen (rob) on 2012-11-21T11:47:13.000+0000

That's exactly right.

Commit to trunk and then merge to release-1.12 though!

Posted by Christer Edvartsen (cogo) on 2012-11-21T11:54:04.000+0000

Ah, sorry, typo. :) Will have a look at the issue sometime this week. I can have a look at the ZendService_ReCaptcha component as well and see if it has the same issue.

Posted by Christer Edvartsen (cogo) on 2012-11-28T10:31:44.000+0000

This commit should fix this issue:…

In the code below the call to $recaptcha->verify() failed even when the correct values where entered into the captcha. After the fix this snippet works as expected.

<pre class="highlight">
$akismet = new Zend_Service_Akismet($key, $url);
  // Some params

$recaptcha = new Zend_Service_ReCaptcha($publicKey, $privateKey, null, null, $ip);

echo "";
echo $recaptcha;
echo "";

if (!empty($_POST)) {

Posted by Christer Edvartsen (cogo) on 2012-11-28T11:59:46.000+0000

Fixed in…

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.