Skip to content

Commit

Permalink
Fixed issue #12372: unsuitable and potentially derogatory CAPTCHA
Browse files Browse the repository at this point in the history
Dev: changed captcha to use mathematical quations again
  • Loading branch information
lacrioque committed Jun 6, 2017
1 parent 6e56319 commit f762a94
Show file tree
Hide file tree
Showing 17 changed files with 916 additions and 6 deletions.
4 changes: 4 additions & 0 deletions application/config/internal.php
Expand Up @@ -50,6 +50,8 @@
// yiiwheels configuration
'yiiwheels' => realpath(__DIR__ . '/../extensions/yiiwheels'),
'vendor.twbs.bootstrap.dist',
// 'CaptchaExtendedAction' => realpath(__DIR__ . '/../extensions/captchaExtended/CaptchaExtendedAction.php'),
// 'CaptchaExtendedValidator' => realpath(__DIR__ . '/../extensions/captchaExtended/CaptchaExtendedValidator.php')
),

'modules'=>array(
Expand Down Expand Up @@ -81,6 +83,8 @@
'bootstrap.widgets.*',
'bootstrap.behaviors.*',
'yiiwheels.widgets.select2.WhSelect2',
'ext.captchaExtended.CaptchaExtendedAction',
'ext.captchaExtended.CaptchaExtendedValidator'

),
'preload' => array ('log'),
Expand Down
4 changes: 2 additions & 2 deletions application/controllers/RegisterController.php
Expand Up @@ -40,8 +40,8 @@ public function actions()
{
return array(
'captcha' => array(
'class' => 'CCaptchaAction',
'backColor'=>0xf6f6f6
'class' => 'CaptchaExtendedAction',
'mode'=>CaptchaExtendedAction::MODE_LOGICAL
)
);
}
Expand Down
5 changes: 3 additions & 2 deletions application/controllers/SurveyController.php
Expand Up @@ -71,8 +71,9 @@ public function actions()
'uploader' => 'application.controllers.uploader',
'verification' => 'application.controllers.verification',
'captcha' => array(
'class' => 'CCaptchaAction',
'backColor'=>0xf6f6f6
'class'=>'CaptchaExtendedAction',
// if needed, modify settings
'mode'=>CaptchaExtendedAction::MODE_LOGICAL,
)
);
}
Expand Down
16 changes: 16 additions & 0 deletions application/extensions/captchaExtended/CHANGELOG
@@ -0,0 +1,16 @@
Captcha Extended Change Log
===========================

Version 1.0.2 Sept 19, 2013
---------------------------
- bugfix: skip captcha counter incrementation if clientajax validation is turned on. Otherwise captcha code would be silently invalidated after entering as many form fields as the number of allowed captcha attempts.

Version 1.0.1 July 01, 2012
---------------------------
- fixed client-side validation that generated incorrect validation hash

Version 1.0.0 August 29, 2011
----------------------------
Initial release

Please report bugs to lubosdz AT hotmail DOT com.

0 comments on commit f762a94

Please sign in to comment.