Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix Security Component CSRF bug #10

Merged
merged 34 commits into from

10 participants

@rnavarro

This pull request is to fix a bug in which CSRF would fail when the security component is enabled.

I've added the necessary form method calls to "unlock" the two recaptcha form fields.

renan and others added some commits
@renan renan Added a Portuguese translation e22b294
@lorenzo lorenzo Adding spanish translation f177db8
@skie skie Added a Russian translation c88b88c
@lorenzo lorenzo Merge remote branch 'origin/master' into develop 3d82e67
@dalpo dalpo added theme option 406004c
@dalpo dalpo updating readme 5897ee7
@dalpo dalpo added lang option 122c812
@dalpo dalpo italian translations 49a0440
@dalpo dalpo RecaptchaHelper::__AesEncrypt() should be private b3652fe
@predominant predominant Merge remote branch 'dalpo/develop' into develop 0d10dfc
@predominant predominant Cleanup Recaptcha helper, remove longer code blocks, standardise form…
…atting.
aaa3e54
@predominant predominant Fix signupUrl generation, added test. a489085
@predominant predominant Restructured generation of scripts. d26647b
@predominant predominant Added test for default recaptcha generation. 1ef9e3c
@predominant predominant Restore error part functionality, added tests. 141a6a8
@real34 real34 Fixed component test case 2223655
@burzum burzum Merged master into develop and added a check if the api response is e…
…mpty
44cf45a
@lorenzo lorenzo Updating api url,
Adding ability to load captcha via ajax
360f83b
@lorenzo lorenzo Merge branch 'develop' of github.com:CakeDC/recaptcha into develop
Conflicts:
	views/helpers/recaptcha.php
2f4d6ae
@lorenzo lorenzo Improving code for adding a recaptcha via ajax 0e51e66
@lorenzo lorenzo Fixing indentation 55569ec
@ajibarra ajibarra Fixed fatal error if current controller is CakeErrorController 5037b12
@tPl0ch tPl0ch Added new option 'recaptchaOptions' to be able to provide 'lang', 'th…
…eme' and 'custom_translations' options to reCaptcha during runtime.
47b1336
@tPl0ch tPl0ch Updated docblock to reflect changes brought in in last commit. adb9dd3
@tPl0ch tPl0ch Refactored code a bit to make use of passed in recaptchaOptions inste…
…ad of hard coded for Ajax type. Fixed typo in method parameter 'appname' to 'appName'.
06ddfc9
@tPl0ch tPl0ch Fixed quotes issue in ajax mode. 0311609
@tPl0ch tPl0ch Moved Model manipulation into RecaptchaComponent::startup() to keep c…
…onfiguration of Component flexible.
307a5a2
@burzum burzum Merge pull request #3 from tPl0ch/develop
New option 'recaptchaOptions' in RecaptchaHelper::display()
a8e9686
Florian Nitschmann Added error translation in German e0fa2b1
@burzum burzum Merge pull request #4 from fnitschmann/master
Error translation
b6a25df
@lorenzo lorenzo Merge branch 'develop' 3835c24
@lorenzo lorenzo Marking version 1.1 7a17617
Robert Navarro Merge branch 'master' into 2.0
Conflicts:
	Controller/Component/RecaptchaComponent.php
	View/Helper/RecaptchaHelper.php
	tests/cases/helpers/recaptcha.test.php
b202a3f
@rnavarro rnavarro Fix Security Component CSRF bug 61699f2
@rnavarro

Oh, and I've also taken the liberty to merge your master branch into your cake 2.0 branch...hence the huge amount of changes...

@burzum burzum merged commit f45db20 into CakeDC:2.0
@burzum

Thanks a lot for this big pull request :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 23, 2010
  1. @renan

    Added a Portuguese translation

    renan authored
Commits on Sep 24, 2010
  1. @lorenzo

    Adding spanish translation

    lorenzo authored
Commits on Sep 27, 2010
  1. @skie

    Added a Russian translation

    skie authored
Commits on Oct 5, 2010
  1. @lorenzo
Commits on Oct 6, 2010
  1. @dalpo

    added theme option

    dalpo authored
  2. @dalpo

    updating readme

    dalpo authored
  3. @dalpo

    added lang option

    dalpo authored
  4. @dalpo

    italian translations

    dalpo authored
  5. @dalpo
Commits on Oct 31, 2010
  1. @predominant
  2. @predominant
  3. @predominant
  4. @predominant
Commits on Nov 1, 2010
  1. @predominant
  2. @predominant
Commits on Nov 2, 2010
  1. @real34

    Fixed component test case

    real34 authored
Commits on Nov 4, 2010
  1. @burzum
Commits on Dec 7, 2010
  1. @lorenzo

    Updating api url,

    lorenzo authored
    Adding ability to load captcha via ajax
  2. @lorenzo

    Merge branch 'develop' of github.com:CakeDC/recaptcha into develop

    lorenzo authored
    Conflicts:
    	views/helpers/recaptcha.php
Commits on Dec 8, 2010
  1. @lorenzo
  2. @lorenzo

    Fixing indentation

    lorenzo authored
Commits on Jun 14, 2011
  1. @ajibarra
Commits on Jul 15, 2011
  1. @tPl0ch

    Added new option 'recaptchaOptions' to be able to provide 'lang', 'th…

    tPl0ch authored
    …eme' and 'custom_translations' options to reCaptcha during runtime.
  2. @tPl0ch
  3. @tPl0ch

    Refactored code a bit to make use of passed in recaptchaOptions inste…

    tPl0ch authored
    …ad of hard coded for Ajax type. Fixed typo in method parameter 'appname' to 'appName'.
  4. @tPl0ch
  5. @tPl0ch

    Moved Model manipulation into RecaptchaComponent::startup() to keep c…

    tPl0ch authored
    …onfiguration of Component flexible.
Commits on Jul 29, 2011
  1. @burzum

    Merge pull request #3 from tPl0ch/develop

    burzum authored
    New option 'recaptchaOptions' in RecaptchaHelper::display()
Commits on Aug 2, 2011
  1. Added error translation in German

    Florian Nitschmann authored
  2. @burzum

    Merge pull request #4 from fnitschmann/master

    burzum authored
    Error translation
Commits on Sep 30, 2011
  1. @lorenzo

    Merge branch 'develop'

    lorenzo authored
  2. @lorenzo

    Marking version 1.1

    lorenzo authored
Commits on Oct 5, 2011
  1. Merge branch 'master' into 2.0

    Robert Navarro authored
    Conflicts:
    	Controller/Component/RecaptchaComponent.php
    	View/Helper/RecaptchaHelper.php
    	tests/cases/helpers/recaptcha.test.php
Commits on Oct 9, 2011
  1. @rnavarro
This page is out of date. Refresh to see the latest.
View
44 Controller/Component/RecaptchaComponent.php
@@ -32,7 +32,7 @@ class RecaptchaComponent extends Component {
*
* @var string
*/
- public $apiUrl = 'http://api-verify.recaptcha.net/verify';
+ public $apiUrl = 'http://www.google.com/recaptcha/api/verify';
/**
* Private API Key
@@ -66,8 +66,12 @@ class RecaptchaComponent extends Component {
* Callback
*
* @param object Controller object
+ * @param Array $settings
*/
public function initialize(Controller $controller, $settings = array()) {
+ if ($controller->name == 'CakeError') {
+ return;
+ }
$this->privateKey = Configure::read('Recaptcha.privateKey');
$this->Controller = $controller;
@@ -78,19 +82,33 @@ public function initialize(Controller $controller, $settings = array()) {
$defaults = array(
'modelClass' => $this->Controller->modelClass,
'errorField' => 'recaptcha',
- 'actions' => array());
+ 'actions' => array()
+ );
$this->settings = array_merge($defaults, $settings);
$this->actions = array_merge($this->actions, $this->settings['actions']);
+ unset($this->settings['actions']);
+ }
+
+ /**
+ * Callback
+ *
+ * @param object Controller object
+ */
+ public function startup(Controller $controller) {
extract($this->settings);
- $this->Controller->helpers[] = 'Recaptcha.Recaptcha';
- $this->Controller->{$modelClass}->Behaviors->attach('Recaptcha.Recaptcha', array(
- 'field' => $errorField));
- $this->Controller->{$modelClass}->recaptcha = true;
- if (in_array($this->Controller->action, $this->actions)) {
- if (!$this->verify()) {
- $this->Controller->{$modelClass}->recaptcha = false;
- $this->Controller->{$modelClass}->recaptchaError = $this->error;
+ if ($this->enabled == true) {
+ $this->Controller->helpers[] = 'Recaptcha.Recaptcha';
+ $this->Controller->{$modelClass}->Behaviors->attach('Recaptcha.Recaptcha', array(
+ 'field' => $errorField
+ ));
+
+ $this->Controller->{$modelClass}->recaptcha = true;
+ if (in_array($this->Controller->action, $this->actions)) {
+ if (!$this->verify()) {
+ $this->Controller->{$modelClass}->recaptcha = false;
+ $this->Controller->{$modelClass}->recaptchaError = $this->error;
+ }
}
}
@@ -110,6 +128,12 @@ public function verify() {
$response = $this->_getApiResponse();
$response = explode("\n", $response);
+
+ if (empty($response[0])) {
+ $this->error = __d('recaptcha', 'Invalid API response, please contact the site admin.', true);
+ return false;
+ }
+
if ($response[0] == 'true') {
return true;
}
View
4 Locale/recaptcha.pot
@@ -8,9 +8,7 @@
# @copyright Copyright 2010, Cake Development Corporation (http://cakedc.com)
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
#
-#, fuzzy
-msgid ""
-msgstr ""
+#
"Project-Id-Version: PROJECT VERSION\n"
"POT-Creation-Date: 2010-09-15 15:30+0200\n"
"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
View
92 View/Helper/RecaptchaHelper.php
@@ -22,17 +22,17 @@ class RecaptchaHelper extends AppHelper {
*
* @var string
*/
- public $secureApiUrl = 'http://api-secure.recaptcha.net';
+ public $secureApiUrl = 'https://www.google.com/recaptcha/api';
/**
* API Url
*
* @var string
*/
- public $apiUrl = 'http://api.recaptcha.net';
+ public $apiUrl = 'http://www.google.com/recaptcha/api';
/**
- * Helpers
+ * View helpers
*
* @var array
*/
@@ -40,12 +40,18 @@ class RecaptchaHelper extends AppHelper {
/**
* Displays the Recaptcha input
+ *
+ * @param array $options An array of options
+ *
+ * ### Options:
*
- * @param
- * @param boolean
- * @return string
+ * - `recaptchaOptions` assoc array of options to pass into RecaptchaOptions var, like 'theme', 'lang'
+ * or 'custom_translations' to runtime configure the widget.
+ *
+ * @return string The resulting mark up
+ * @access public
*/
- function display($options = array()) {
+ public function display($options = array()) {
$defaults = array(
'element' => null,
'publicKey' => Configure::read('Recaptcha.publicKey'),
@@ -53,7 +59,14 @@ function display($options = array()) {
'ssl' => true,
'error' => false,
'div' => array(
- 'class' => 'recaptcha'));
+ 'class' => 'recaptcha'
+ ),
+ 'recaptchaOptions' => array(
+ 'theme' => 'red',
+ 'lang' => 'en',
+ 'custom_translations' => array()
+ )
+ );
$options = array_merge($defaults, $options);
extract($options);
@@ -78,22 +91,53 @@ function display($options = array()) {
return $this->View->element($element, $elementOptions);
}
- $script = '<script type="text/javascript" src="'. $server . '/challenge?k=' . $publicKey . '"></script>
- <noscript>
- <iframe src="'. $server . '/noscript?k=' . $publicKey . '" height="300" width="500" frameborder="0"></iframe><br/>
- <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
- <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
- </noscript>';
+ $jsonOptions = json_encode($recaptchaOptions);
+ unset($recaptchaOptions);
- if (!empty($error)) {
- $script .= $this->Form->error($error);
- }
+ if (empty($this->params['isAjax'])) {
+ $configScript = sprintf('var RecaptchaOptions = %s', $jsonOptions);
+ $this->Html->scriptBlock($configScript, array('inline' => false));
+
+ $script = '<script type="text/javascript" src="'. $server . '/challenge?k=' . $publicKey . '"></script>
+ <noscript>
+ <iframe src="'. $server . '/noscript?k=' . $publicKey . '" height="300" width="500" frameborder="0"></iframe><br/>
+ <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
+ <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
+ </noscript>';
- if ($options['div'] != false) {
- $script = $this->Html->tag('div', $script, $options['div']);
+ if (!empty($error)) {
+ $script .= $this->Form->error($error);
+ }
+
+ if ($options['div'] != false) {
+ $script = $this->Html->tag('div', $script, $options['div']);
+ }
+
+ $this->Form->unlockField('recaptcha_challenge_field');
+ $this->Form->unlockField('recaptcha_response_field');
+
+ return $script;
}
- return $script;
+ $id = uniqid('recaptcha-');
+
+ return '<div id="'.$id.'"></div>' .
+ '<script>
+ if (window.Recaptcha == undefined) {
+ (function() {
+ var headID = document.getElementsByTagName("head")[0];
+ var newScript = document.createElement("script");
+ newScript.type = "text/javascript";
+ newScript.onload = function() {
+ Recaptcha.create("' . $publicKey . '", "' . $id . '", ' . $jsonOptions . ');
+ };
+ newScript.src = "'. $server . '/js/recaptcha_ajax.js"
+ headID.appendChild(newScript);
+ })();
+ } else {
+ setTimeout(\'Recaptcha.create("'.$publicKey.'", "'.$id.'", ' . $jsonOptions . ')\', 1000);
+ }
+ </script>';
}
/**
@@ -101,7 +145,7 @@ function display($options = array()) {
*
* @return string
*/
- function signupUrl($appName = null) {
+ public function signupUrl($appName = null) {
return "http://recaptcha.net/api/getkey?domain=" . WWW_ROOT . '&amp;app=' . urlencode($appName);
}
@@ -122,7 +166,7 @@ private function __AesPad($val) {
*
* @return string
*/
- function __AesEncrypt($value, $key) {
+ private function __AesEncrypt($value, $key) {
if (!function_exists('mcrypt_encrypt')) {
throw new Exception(__d('recaptcha', 'To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.', true));
}
@@ -135,7 +179,7 @@ function __AesEncrypt($value, $key) {
}
/**
- *
+ * Mail-hide URL
*
* @return string base 64 encrypted string
*/
@@ -200,4 +244,4 @@ public function mailHide($email) {
"' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);
}
-}
+}
View
28 locale/deu/LC_MESSAGES/recaptcha.po
@@ -0,0 +1,28 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: CakePHP Recaptcha Plugin\n"
+"POT-Creation-Date: 2011-08-02 12:00+0200\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Florian Nitschmann <infoqflorian-nitschmann.de>\n"
+"Language-Team: media-n <info@media-n.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: French\n"
+
+#: /controllers/components/recaptcha.php:79
+msgid "You must set your private recaptcha key using Cofigure::write('Recaptcha.privateKey', 'your-key');!"
+msgstr "Sie müssen Ihren privaten Recaptcha Schlüssel setzen in Cofigure::write('Recaptcha.privateKey', 'your-key');!"
+
+#: /controllers/components/recaptcha.php:110
+msgid "Incorect captcha"
+msgstr "Falscher captcha"
+
+#: /views/helpers/recaptcha.php:115
+msgid "To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."
+msgstr "Um reCAPTCHA Mailhide nutzen zu können muss das mcrypt PHP-Modul installiert werden."
+
+#: /views/helpers/recaptcha.php:147
+msgid "You need to set a private and public mail hide key. Please visit http://mailhide.recaptcha.net/apikey"
+msgstr "Es muss ein privater und öffentlicher mail hide Schlüssel erstellt werden. Bitte besuchen Sie: http://mailhide.recaptcha.net/apikey"
+
View
40 locale/ita/LC_MESSAGES/recaptcha.po
@@ -0,0 +1,40 @@
+# LANGUAGE translation of the CakePHP Categories plugin
+#
+# Copyright 2010, Cake Development Corporation (http://cakedc.com)
+#
+# Licensed under The MIT License
+# Redistributions of files must retain the above copyright notice.
+#
+# @copyright Copyright 2010, Cake Development Corporation (http://cakedc.com)
+# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2010-09-15 15:30+0200\n"
+"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
+"Last-Translator: NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: /controllers/components/recaptcha.php:79
+msgid "You must set your private recaptcha key using Cofigure::write('Recaptcha.privateKey', 'your-key');!"
+msgstr "Devi impostare la chiave privata per poter utilizzare reCAPTCHA. Usa: Cofigure::write('Recaptcha.privateKey', 'chiave');"
+
+#: /controllers/components/recaptcha.php:110
+msgid "Incorect captcha"
+msgstr "Captcha non valido"
+
+#: /views/helpers/recaptcha.php:115
+msgid "To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."
+msgstr "Per utilizzare reCAPTCHA Mailhide, devi aver istallato il modulo php mcrypt."
+
+#: /views/helpers/recaptcha.php:147
+msgid "You need to set a private and public mail hide key. Please visit http://mailhide.recaptcha.net/apikey"
+msgstr "Devi registrare reCAPTCHA Mailhide API key. http://mailhide.recaptcha.net/apikey"
+
+
View
40 locale/por/LC_MESSAGES/recaptcha.po
@@ -0,0 +1,40 @@
+# LANGUAGE translation of the CakePHP Categories plugin
+#
+# Copyright 2010, Cake Development Corporation (http://cakedc.com)
+#
+# Licensed under The MIT License
+# Redistributions of files must retain the above copyright notice.
+#
+# @copyright Copyright 2010, Cake Development Corporation (http://cakedc.com)
+# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: CakePHP Recaptcha Plugin\n"
+"POT-Creation-Date: 2010-09-15 15:30+0200\n"
+"PO-Revision-Date: 2010-09-23 18:57-0300\n"
+"Last-Translator: Renan Gonçalves <renan.saddam@gmail.com>\n"
+"Language-Team: CakeDC <renan.saddam@gmail.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2;plural=n>1;\n"
+"X-Poedit-Language: Portuguese\n"
+"X-Poedit-Country: BRAZIL\n"
+
+#: /controllers/components/recaptcha.php:79
+msgid "You must set your private recaptcha key using Cofigure::write('Recaptcha.privateKey', 'your-key');!"
+msgstr "Você deve definir a sua chave privada usando Cofigure::write('Recaptcha.privateKey', 'your-key');!"
+
+#: /controllers/components/recaptcha.php:110
+msgid "Incorect captcha"
+msgstr "Captcha incorreto"
+
+#: /views/helpers/recaptcha.php:115
+msgid "To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."
+msgstr "Para usar o reCAPTCHA Mailhide, você precisa ter o módulo php mcrypt instalado."
+
+#: /views/helpers/recaptcha.php:147
+msgid "You need to set a private and public mail hide key. Please visit http://mailhide.recaptcha.net/apikey"
+msgstr "Você precisa configurar uma chave privada e pública. Por favor, visite http://mailhide.recaptcha.net/apikey"
+
View
28 locale/rus/LC_MESSAGES/recaptcha.po
@@ -0,0 +1,28 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: CakePHP Recaptcha Plugin\n"
+"POT-Creation-Date: 2010-09-15 15:30+0200\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Pierre MARTIN <contact@pierre-martin.fr>\n"
+"Language-Team: CakeDC <contact@cakedc.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: French\n"
+
+#: /controllers/components/recaptcha.php:79
+msgid "You must set your private recaptcha key using Cofigure::write('Recaptcha.privateKey', 'your-key');!"
+msgstr "Vous devez définir votre clé privée Recaptcha en utilisant Configure::write('Recaptcha.privateKey', 'votre-clé'); !"
+
+#: /controllers/components/recaptcha.php:110
+msgid "Incorect captcha"
+msgstr "Captcha incorrect"
+
+#: /views/helpers/recaptcha.php:115
+msgid "To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."
+msgstr "Afin d'utiliser reCAPTCHA Mailhide, vous devez avoir le module php mcrypt installé."
+
+#: /views/helpers/recaptcha.php:147
+msgid "You need to set a private and public mail hide key. Please visit http://mailhide.recaptcha.net/apikey"
+msgstr "Vous devez définir les clés publique et privée mailhide. Veuillez visiter http://mailhide.recaptcha.net/apikey"
+
View
38 locale/spa/LC_MESSAGES/recaptcha.po
@@ -0,0 +1,38 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Recaptcha CakePHP plugin\n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: \n"
+"Last-Translator: José Lorenzo Rodríguez <jose.lorenzo@cakedc.com>\n"
+"Language-Team: CakeDC <contact@cakedc.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+# LANGUAGE translation of the CakePHP Categories plugin
+#
+# Copyright 2010, Cake Development Corporation (http://cakedc.com)
+#
+# Licensed under The MIT License
+# Redistributions of files must retain the above copyright notice.
+#
+# @copyright Copyright 2010, Cake Development Corporation (http://cakedc.com)
+# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+#
+#
+#: /controllers/components/recaptcha.php:79
+msgid "You must set your private recaptcha key using Cofigure::write('Recaptcha.privateKey', 'your-key');!"
+msgstr "Debes configurar tu clave privada de recaptcha usando Cofigure::write('Recaptcha.privateKey', 'your-key');"
+
+#: /controllers/components/recaptcha.php:110
+msgid "Incorect captcha"
+msgstr "Transcripción incorrecta"
+
+#: /views/helpers/recaptcha.php:115
+msgid "To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."
+msgstr "Para usar la función de oculatar emails de reCAPTCHA , debes tener el modulo mcrypt de php instalado."
+
+#: /views/helpers/recaptcha.php:147
+msgid "You need to set a private and public mail hide key. Please visit http://mailhide.recaptcha.net/apikey"
+msgstr "Debes configurar tus claves públicas y privadas de \"mail hide\". Por favor visita http://mailhide.recaptcha.net/apikey"
+
View
10 readme.md
@@ -1,5 +1,7 @@
# Recaptcha Plugin for CakePHP #
+Version 1.1
+
The Recaptcha plugin for CakePHP provides spam protection in an easy use helper.
## Usage ##
@@ -19,6 +21,12 @@ In the view simply call the helpers `display()` method to render the recaptcha i
echo $this->Recaptcha->display();
+You could select another theme, setup it as parameter, for istance:
+
+ echo $this->Recaptcha->display(array('theme' => 'blackglass'));
+
+For the complete list of themes, take a look here: [http://code.google.com/intl/it-IT/apis/recaptcha/docs/customization.html](http://code.google.com/intl/it-IT/apis/recaptcha/docs/customization.html).
+
To check the result simply do something like this in your controller:
if ($this->request->is('post')) {
@@ -50,7 +58,7 @@ Redistributions of files must retain the above copyright notice.
## Copyright ###
-Copyright 2009-2010<br/>
+Copyright 2009-2011<br/>
[Cake Development Corporation](http://cakedc.com)<br/>
1785 E. Sahara Avenue, Suite 490-423<br/>
Las Vegas, Nevada 89104<br/>
Something went wrong with that request. Please try again.