<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Validating reCaptcha with jQuery and AJAX</title>
	<atom:link href="http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/</link>
	<description>Because Everyone Has A Dark Side</description>
	<lastBuildDate>Sat, 24 Jul 2010 03:45:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Joe</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21240</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Fri, 04 Jun 2010 21:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21240</guid>
		<description>Thanks for this - with a few tweaks I was able to implement it directly into my site.</description>
		<content:encoded><![CDATA[<p>Thanks for this &#8211; with a few tweaks I was able to implement it directly into my site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zastrahovki</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21237</link>
		<dc:creator>Zastrahovki</dc:creator>
		<pubDate>Wed, 02 Jun 2010 07:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21237</guid>
		<description>is there any working for I can see, there is one posted link in the comments is no longer using this method .
Regards</description>
		<content:encoded><![CDATA[<p>is there any working for I can see, there is one posted link in the comments is no longer using this method .<br />
Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Trowbridge</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21236</link>
		<dc:creator>Jonathan Trowbridge</dc:creator>
		<pubDate>Tue, 01 Jun 2010 21:26:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21236</guid>
		<description>Thank you for posting this!</description>
		<content:encoded><![CDATA[<p>Thank you for posting this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21229</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Mon, 26 Apr 2010 22:20:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21229</guid>
		<description>@Bucabay

As I was reading through the comments from this post I thought of the exact same solution. If you check the reCAPTCHA using Ajax, simply set a session variable if the check succeeded.

Then when you go to do the server-side validation, you will know if the person is already validated; just check the same session variable.

Don&#039;t forget to unset your session variable after performing your actions, or a bot master could pass the test once, then spam like crazy subsequently because he is still validated.</description>
		<content:encoded><![CDATA[<p>@Bucabay</p>
<p>As I was reading through the comments from this post I thought of the exact same solution. If you check the reCAPTCHA using Ajax, simply set a session variable if the check succeeded.</p>
<p>Then when you go to do the server-side validation, you will know if the person is already validated; just check the same session variable.</p>
<p>Don&#8217;t forget to unset your session variable after performing your actions, or a bot master could pass the test once, then spam like crazy subsequently because he is still validated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bucabay</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21226</link>
		<dc:creator>Bucabay</dc:creator>
		<pubDate>Thu, 22 Apr 2010 23:19:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21226</guid>
		<description>Note that you need to save the captcha validation result in the session. If you just use JavaScript, you essentially just have JavaScript validation, which bots ignore anyway. 
So you just made it harder for humans to submit the form, and did nothing for the bots that visit it. 

In the page that validates the captcha: 

if ($resp-&gt;is_valid) {
    session_start();
    echo &#039;success&#039;;
    $_SESSION[&#039;captcha&#039;] = 1;
}

Then on the PHP page that processes the form:

if (!$_SESSION[&#039;captcha&#039;]) {
// someone tried to bypass the captcha. Don&#039;t waste your resources 
die;
}</description>
		<content:encoded><![CDATA[<p>Note that you need to save the captcha validation result in the session. If you just use JavaScript, you essentially just have JavaScript validation, which bots ignore anyway.<br />
So you just made it harder for humans to submit the form, and did nothing for the bots that visit it. </p>
<p>In the page that validates the captcha: </p>
<p>if ($resp-&gt;is_valid) {<br />
    session_start();<br />
    echo &#8216;success&#8217;;<br />
    $_SESSION['captcha'] = 1;<br />
}</p>
<p>Then on the PHP page that processes the form:</p>
<p>if (!$_SESSION['captcha']) {<br />
// someone tried to bypass the captcha. Don&#8217;t waste your resources<br />
die;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21223</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 19 Apr 2010 03:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21223</guid>
		<description>I fully plan to figure out a better way to do all of this, but I just haven&#039;t had the time lately.</description>
		<content:encoded><![CDATA[<p>I fully plan to figure out a better way to do all of this, but I just haven&#8217;t had the time lately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21220</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Fri, 02 Apr 2010 19:16:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21220</guid>
		<description>Heya - I&#039;m a bit of a hack, and seem to be having the same issue as Bobby above - The validation works gret, but the form never gets submitted. What am I missing? Can you help?</description>
		<content:encoded><![CDATA[<p>Heya &#8211; I&#8217;m a bit of a hack, and seem to be having the same issue as Bobby above &#8211; The validation works gret, but the form never gets submitted. What am I missing? Can you help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Sinton</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21218</link>
		<dc:creator>Robert Sinton</dc:creator>
		<pubDate>Wed, 24 Mar 2010 20:12:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21218</guid>
		<description>PS If anyone else is getting as frustrated as me by trying to do all this in a single ajax operation talking directly the the reCaptch API server, you are almost certainly going to be defeated by browser security practices, preventing your page from directly loading the response from the reCaptcha domain.

No doubt that is why Chris used a separate local php script to do the checking in the first place.</description>
		<content:encoded><![CDATA[<p>PS If anyone else is getting as frustrated as me by trying to do all this in a single ajax operation talking directly the the reCaptch API server, you are almost certainly going to be defeated by browser security practices, preventing your page from directly loading the response from the reCaptcha domain.</p>
<p>No doubt that is why Chris used a separate local php script to do the checking in the first place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Sinton</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21217</link>
		<dc:creator>Robert Sinton</dc:creator>
		<pubDate>Wed, 24 Mar 2010 19:23:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21217</guid>
		<description>Re: the issue with bypassing the reCaptcha if the checking is built into the front end rather than the form-processing script: you definitely do need to take extra steps to handle that.

Alex mentioned that he is going to handle the processing during the validation operation, so in a sense there is no form-processing script, at least not one that does the &#039;real&#039; work.

This week I implemented a two-stage form, where we needed to verify the user&#039;s humanity at both stages, but didn&#039;t want to put them though two reCaptchas. I implemented this by setting a random temporary &#039;password&#039; on the user&#039;s customer record in the backend database once they had passed the first stage, and then incorporated that password into a hidden field in the second-stage form. Seeing that password come back with the submission of the second-stage form proved the user&#039;s humanity without requiring any extra action on their part.</description>
		<content:encoded><![CDATA[<p>Re: the issue with bypassing the reCaptcha if the checking is built into the front end rather than the form-processing script: you definitely do need to take extra steps to handle that.</p>
<p>Alex mentioned that he is going to handle the processing during the validation operation, so in a sense there is no form-processing script, at least not one that does the &#8216;real&#8217; work.</p>
<p>This week I implemented a two-stage form, where we needed to verify the user&#8217;s humanity at both stages, but didn&#8217;t want to put them though two reCaptchas. I implemented this by setting a random temporary &#8216;password&#8217; on the user&#8217;s customer record in the backend database once they had passed the first stage, and then incorporated that password into a hidden field in the second-stage form. Seeing that password come back with the submission of the second-stage form proved the user&#8217;s humanity without requiring any extra action on their part.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21210</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Wed, 24 Feb 2010 13:19:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21210</guid>
		<description>Hello

I see that you use ajax.recaptcha.php to validate if a captcha is correct and then if it is, it is submited

But when someone hacks the page, he can force it to just post it anyway.

So I would like a more secure solution, that the check is done on the server and when the check is successful the filled in form is send to the database or whatever has to happen

So everything including the filled in form and captcha is send to the server.

So far as I can see this is not 100% waterproof :)

Could you please update me on this, since I&#039;m looking for a solid solution to integrate a captcha in a jquery modal dialog.

gr 

Jan</description>
		<content:encoded><![CDATA[<p>Hello</p>
<p>I see that you use ajax.recaptcha.php to validate if a captcha is correct and then if it is, it is submited</p>
<p>But when someone hacks the page, he can force it to just post it anyway.</p>
<p>So I would like a more secure solution, that the check is done on the server and when the check is successful the filled in form is send to the database or whatever has to happen</p>
<p>So everything including the filled in form and captcha is send to the server.</p>
<p>So far as I can see this is not 100% waterproof <img src='http://www.darksideofthecarton.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Could you please update me on this, since I&#8217;m looking for a solid solution to integrate a captcha in a jquery modal dialog.</p>
<p>gr </p>
<p>Jan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21209</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 19 Feb 2010 05:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21209</guid>
		<description>@nesh I will indeed.</description>
		<content:encoded><![CDATA[<p>@nesh I will indeed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nesh</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21198</link>
		<dc:creator>nesh</dc:creator>
		<pubDate>Fri, 29 Jan 2010 19:37:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21198</guid>
		<description>@Chris

will you be posting the article that works with a current version of reCaptcha and incorporates all the comments and stuff? thanks</description>
		<content:encoded><![CDATA[<p>@Chris</p>
<p>will you be posting the article that works with a current version of reCaptcha and incorporates all the comments and stuff? thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21196</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 25 Jan 2010 21:11:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21196</guid>
		<description>@Alex

When I wrote this, reCaptcha didn&#039;t have their own exposed AJAX API methods so I had to use alternate methods. I have finally cleared enough off my table at work to redo this article with a current version of reCaptcha.</description>
		<content:encoded><![CDATA[<p>@Alex</p>
<p>When I wrote this, reCaptcha didn&#8217;t have their own exposed AJAX API methods so I had to use alternate methods. I have finally cleared enough off my table at work to redo this article with a current version of reCaptcha.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bobby</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21194</link>
		<dc:creator>bobby</dc:creator>
		<pubDate>Mon, 04 Jan 2010 19:56:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21194</guid>
		<description>I got the recaptcha thing to work .. but its not submitting the form ? it just says ... Success. Submitting form.

how do i get it to actually submit the form ?</description>
		<content:encoded><![CDATA[<p>I got the recaptcha thing to work .. but its not submitting the form ? it just says &#8230; Success. Submitting form.</p>
<p>how do i get it to actually submit the form ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.darksideofthecarton.com/2008/12/15/validating-recaptcha-with-jquery-and-ajax/comment-page-1/#comment-21184</link>
		<dc:creator>James</dc:creator>
		<pubDate>Wed, 16 Dec 2009 20:57:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.darksideofthecarton.com/?p=313#comment-21184</guid>
		<description>You are a life saver. I had the same problem with using jquery validate and the remote call -- I wanted the result to send back true or false and either reload the recaptcha or recognize that it was filled out correctly. That worked, but then the form wouldn&#039;t submit. Used your tip to finish it off. The form is in action at http://www.ontaponline.com/register. 

If anyone wants the full code just let me know and I can post it or email it.

Cheers.</description>
		<content:encoded><![CDATA[<p>You are a life saver. I had the same problem with using jquery validate and the remote call &#8212; I wanted the result to send back true or false and either reload the recaptcha or recognize that it was filled out correctly. That worked, but then the form wouldn&#8217;t submit. Used your tip to finish it off. The form is in action at <a href="http://www.ontaponline.com/register" rel="nofollow">http://www.ontaponline.com/register</a>. </p>
<p>If anyone wants the full code just let me know and I can post it or email it.</p>
<p>Cheers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.687 seconds -->
