You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using wp-recaptcha 3.1.6 with WP version 3.4 (all bugs existed also in 3.3.2)
All bugs related to undefined variables.
WP-recaptcha throws errors of undefined variables on all page loads.
PHP Notice: Undefined variable: rcommentid in /wp-content/plugins/wp-recaptcha/recaptcha.php on line 482
PHP Notice: Undefined variable: rchash in /wp-content/plugins/wp-recaptcha/recaptcha.php on line 484
FIX: Added in a check
if (!empty($_REQUEST['rcommentid']))
$comment_id = $_REQUEST['rcommentid'];
if (!empty($_REQUEST['rchash']))
$comment_hash = $_REQUEST['rchash'];
on a single post with comment form
PHP Notice: Undefined index: rerror in /wp-content/plugins/wp-recaptcha/recaptcha.php on line 401
FIX: Added in a check
if (isset($_GET['rerror'])) {
$escaped_error = htmlentities($_GET['rerror'], ENT_QUOTES);
}
on the WP login page (using wp-recaptcha)
PHP Notice: Undefined index: rerror in /var/www/html/student/bellona/public_html/chinavine2/wp-content/plugins/wp-recaptcha/recaptcha.php on line 278
FIX: Added in a check
if (isset($_GET['rerror'])) {
$escaped_error = htmlentities($_GET['rerror'], ENT_QUOTES);
} else {
$escaped_error = '';
}
after logging a comment
PHP Notice: Undefined variable: needed_capability in /var/www/html/student/bellona/public_html/chinavine2/wp-content/plugins/wp-recaptcha/recaptcha.php on line 439
FIX: Nested the conditional for returning the comment since it requires a defined variable
if ($this->options['bypass_for_registered_users'] && $this->options['minimum_bypass_level']) {
$needed_capability = $this->options['minimum_bypass_level'];
if (($needed_capability && current_user_can($needed_capability)) || !$this->options['show_in_comments'])
return $comment_data;
}
That's it. Thanks for your work.
The text was updated successfully, but these errors were encountered:
Using wp-recaptcha 3.1.6 with WP version 3.4 (all bugs existed also in 3.3.2)
All bugs related to undefined variables.
PHP Notice: Undefined variable: rcommentid in /wp-content/plugins/wp-recaptcha/recaptcha.php on line 482
PHP Notice: Undefined variable: rchash in /wp-content/plugins/wp-recaptcha/recaptcha.php on line 484
FIX: Added in a check
if (!empty($_REQUEST['rcommentid']))
$comment_id = $_REQUEST['rcommentid'];
on a single post with comment form
PHP Notice: Undefined index: rerror in /wp-content/plugins/wp-recaptcha/recaptcha.php on line 401
FIX: Added in a check
if (isset($_GET['rerror'])) {
$escaped_error = htmlentities($_GET['rerror'], ENT_QUOTES);
}
on the WP login page (using wp-recaptcha)
PHP Notice: Undefined index: rerror in /var/www/html/student/bellona/public_html/chinavine2/wp-content/plugins/wp-recaptcha/recaptcha.php on line 278
FIX: Added in a check
if (isset($_GET['rerror'])) {
$escaped_error = htmlentities($_GET['rerror'], ENT_QUOTES);
} else {
$escaped_error = '';
}
after logging a comment
PHP Notice: Undefined variable: needed_capability in /var/www/html/student/bellona/public_html/chinavine2/wp-content/plugins/wp-recaptcha/recaptcha.php on line 439
FIX: Nested the conditional for returning the comment since it requires a defined variable
That's it. Thanks for your work.
The text was updated successfully, but these errors were encountered: