Skip to content

Commit

Permalink
XML RPC request should get hard blocker quicker (#8855)
Browse files Browse the repository at this point in the history
Currently math fallback doesn't do anything for xml rpc requests.

This PR blocks xmlrpc requests for would regularly show the math test just gets bypassed and allows more valid xml rpc requests though.
  • Loading branch information
enejb authored and dereksmart committed Mar 16, 2018
1 parent 7e3e72d commit 46152c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/protect.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ function block_with_math() {
* @param bool true Should we fallback to the Math questions when an IP is blocked. Default to true.
*/
$allow_math_fallback_on_fail = apply_filters( 'jpp_use_captcha_when_blocked', true );
if ( ! $allow_math_fallback_on_fail ) {
if ( ! $allow_math_fallback_on_fail || Jetpack_Constants::is_true( 'XMLRPC_REQUEST' ) ) {
$this->kill_login();
}
include_once dirname( __FILE__ ) . '/protect/math-fallback.php';
Expand Down

0 comments on commit 46152c6

Please sign in to comment.