Skip to content

Commit

Permalink
Login: Disable all XML-RPC methods on login.w.org, they aren't used a…
Browse files Browse the repository at this point in the history
…nd this might persuade some vulneravility scanners not to waste their time with invalid payloads.

git-svn-id: https://meta.svn.wordpress.org/sites/trunk@11426 74240141-8908-4e6f-9713-ba540dce6ec7
  • Loading branch information
dd32 committed Jan 11, 2022
1 parent 1975772 commit 3886f43
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ function wporg_login_init() {
/**
* Disable the Core Language Selector on wp-login.php.
*/
function wporg_login_disable_lang_switcher() {
add_filter( 'login_display_language_dropdown', '__return_false' );
}
add_action( 'login_init', 'wporg_login_disable_lang_switcher' );
add_filter( 'login_display_language_dropdown', '__return_false' );

/**
* Disable XML-RPC endpoints.
*/
add_filter( 'xmlrpc_methods', '__return_empty_array' );

/**
* Replace cores login CSS with our own.
Expand Down

0 comments on commit 3886f43

Please sign in to comment.