Skip to content

Commit 82d3f79

Browse files
committed
Bad Requests: Disable the demo.addTwoNumbers XMLRPC endpoint.
git-svn-id: https://meta.svn.wordpress.org/sites/trunk@14409 74240141-8908-4e6f-9713-ba540dce6ec7
1 parent d2e5f14 commit 82d3f79

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-bad-request.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,15 @@ function check_for_invalid_query_vars( $vars, $ref = '$public_query_vars' ) {
140140
}
141141
}, 1 );
142142

143+
/**
144+
* Disable Demo XMLRPC endpoints that are easy to trigger noisy fatals with invalid inputs.
145+
*/
146+
add_filter( 'xmlrpc_methods', function( $methods ) {
147+
unset( $methods['demo.addTwoNumbers'] );
148+
149+
return $methods;
150+
} );
151+
143152
/**
144153
* Detect invalid requests from over hungry vulnerability scanners.
145154
*/

0 commit comments

Comments
 (0)