From c9828bc52745476d6162193b30c2b1fb5790df05 Mon Sep 17 00:00:00 2001 From: Enej Bajgoric Date: Fri, 13 Apr 2018 16:17:01 -0700 Subject: [PATCH] Protect: Revert XML RPC request should get hard blocker quicke (#9312) Since a lot of third party services relied on this be able to connect and were blocked as a result we decided to revert the PR. If someone want to hadern their XMLRPC connection they can use the following code instead. ``` add_filter( 'jpp_use_captcha_when_blocked', 'jetpack_no_captia_on_xmlrpc_requests' ); function jetpack_no_captia_on_xmlrpc_requests($allow_math_fallback) { if( Jetpack_Constants::is_true( 'XMLRPC_REQUEST' ) ) { return false; } return $allow_math_fallback; } ``` --- modules/protect.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/protect.php b/modules/protect.php index 1a56c292020b1..5a8b2e4f2193f 100644 --- a/modules/protect.php +++ b/modules/protect.php @@ -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 || Jetpack_Constants::is_true( 'XMLRPC_REQUEST' ) ) { + if ( ! $allow_math_fallback_on_fail ) { $this->kill_login(); } include_once dirname( __FILE__ ) . '/protect/math-fallback.php';