Version Description
- Fix: Final fix for CF7
Download this release
Release Info
Developer | dfactory |
Plugin | Math Captcha |
Version | 1.2.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.5 to 1.2.5.1
- includes/integrations/contact-form-7.php +5 -2
- readme.txt +6 -3
- wp-math-captcha.php +2 -2
includes/integrations/contact-form-7.php
CHANGED
@@ -61,6 +61,9 @@ function wpcf7_mathcaptcha_validation_filter($result, $tag)
|
|
61 |
{
|
62 |
$cf7_version = get_option('wpcf7', '1.0.0');
|
63 |
|
|
|
|
|
|
|
64 |
if($_POST[$name] !== '')
|
65 |
{
|
66 |
$session_id = (isset($_POST[$name.'-sn']) && $_POST[$name.'-sn'] !== '' ? Math_Captcha()->cookie_session->session_ids['multi'][$_POST[$name.'-sn']] : '');
|
@@ -70,11 +73,11 @@ function wpcf7_mathcaptcha_validation_filter($result, $tag)
|
|
70 |
if(strcmp(get_transient('cf7_'.$session_id), sha1(AUTH_KEY.$_POST[$name].$session_id, false)) !== 0)
|
71 |
{
|
72 |
if(version_compare($cf7_version, '4.1.0', '>='))
|
73 |
-
$result
|
74 |
else
|
75 |
{
|
76 |
$result['valid'] = false;
|
77 |
-
$result
|
78 |
}
|
79 |
}
|
80 |
}
|
61 |
{
|
62 |
$cf7_version = get_option('wpcf7', '1.0.0');
|
63 |
|
64 |
+
if(is_array($cf7_version) && isset($cf7_version['version']))
|
65 |
+
$cf7_version = $cf7_version['version'];
|
66 |
+
|
67 |
if($_POST[$name] !== '')
|
68 |
{
|
69 |
$session_id = (isset($_POST[$name.'-sn']) && $_POST[$name.'-sn'] !== '' ? Math_Captcha()->cookie_session->session_ids['multi'][$_POST[$name.'-sn']] : '');
|
73 |
if(strcmp(get_transient('cf7_'.$session_id), sha1(AUTH_KEY.$_POST[$name].$session_id, false)) !== 0)
|
74 |
{
|
75 |
if(version_compare($cf7_version, '4.1.0', '>='))
|
76 |
+
$result->invalidate($tag, wpcf7_get_message('wrong_mathcaptcha'));
|
77 |
else
|
78 |
{
|
79 |
$result['valid'] = false;
|
80 |
+
$result['reason'][$name] = wpcf7_get_message('wrong_mathcaptcha');
|
81 |
}
|
82 |
}
|
83 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.dfactory.eu/
|
|
4 |
Tags: antispam, capcha, captcha, captha, catcha, comment, comments, spam, security, login, lost password, math captcha, registration, cf7, contact, contact forms, form, contact form 7, bbpress
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.1.1
|
7 |
-
Stable tag: 1.2.5
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
@@ -61,6 +61,9 @@ A. Chances are, someone else has asked it. Check out the support forum at: http:
|
|
61 |
|
62 |
== Changelog ==
|
63 |
|
|
|
|
|
|
|
64 |
= 1.2.5 =
|
65 |
* Fix: Contact Form 7 validation issue, due to recent CF7 changes
|
66 |
|
@@ -130,5 +133,5 @@ A. Chances are, someone else has asked it. Check out the support forum at: http:
|
|
130 |
|
131 |
== Upgrade Notice ==
|
132 |
|
133 |
-
= 1.2.5 =
|
134 |
-
* Fix:
|
4 |
Tags: antispam, capcha, captcha, captha, catcha, comment, comments, spam, security, login, lost password, math captcha, registration, cf7, contact, contact forms, form, contact form 7, bbpress
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.1.1
|
7 |
+
Stable tag: 1.2.5.1
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
61 |
|
62 |
== Changelog ==
|
63 |
|
64 |
+
= 1.2.5.1 =
|
65 |
+
* Fix: Final fix for CF7
|
66 |
+
|
67 |
= 1.2.5 =
|
68 |
* Fix: Contact Form 7 validation issue, due to recent CF7 changes
|
69 |
|
133 |
|
134 |
== Upgrade Notice ==
|
135 |
|
136 |
+
= 1.2.5.1 =
|
137 |
+
* Fix: Final fix for CF7
|
wp-math-captcha.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Math Captcha
|
4 |
Description: Math Captcha is a <strong>100% effective CAPTCHA for WordPress</strong> that integrates into login, registration, comments, Contact Form 7 and bbPress.
|
5 |
-
Version: 1.2.5
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/math-captcha/
|
@@ -67,7 +67,7 @@ class Math_Captcha
|
|
67 |
'deactivation_delete' => false,
|
68 |
'flush_rules' => false
|
69 |
),
|
70 |
-
'version' => '1.2.5'
|
71 |
);
|
72 |
|
73 |
|
2 |
/*
|
3 |
Plugin Name: Math Captcha
|
4 |
Description: Math Captcha is a <strong>100% effective CAPTCHA for WordPress</strong> that integrates into login, registration, comments, Contact Form 7 and bbPress.
|
5 |
+
Version: 1.2.5.1
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/math-captcha/
|
67 |
'deactivation_delete' => false,
|
68 |
'flush_rules' => false
|
69 |
),
|
70 |
+
'version' => '1.2.5.1'
|
71 |
);
|
72 |
|
73 |
|