Skip to content

Commit

Permalink
Protect: Revert XML RPC request should get hard blocker quicke (#9312)
Browse files Browse the repository at this point in the history
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;
}
```
  • Loading branch information
enejb authored Apr 13, 2018
1 parent ce2a2f0 commit c9828bc
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 || Jetpack_Constants::is_true( 'XMLRPC_REQUEST' ) ) {
if ( ! $allow_math_fallback_on_fail ) {
$this->kill_login();
}
include_once dirname( __FILE__ ) . '/protect/math-fallback.php';
Expand Down

0 comments on commit c9828bc

Please sign in to comment.