Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/wordpress] Add env var to disable XML-RPC #50838

Closed
wants to merge 10 commits into from
Closed

[bitnami/wordpress] Add env var to disable XML-RPC #50838

wants to merge 10 commits into from

Conversation

kimdre
Copy link
Contributor

@kimdre kimdre commented Oct 3, 2023

Description of the change

This PR implements a new environment variable to the (Apache) Wordpress image called WORDPRESS_ENABLE_XML_RPC, that lets you disable/block access to the Wordpress XML-RPC endpoint at xmlrpc.php, as this endpoint is deprecated in favor of the now used Wordpress Rest API and may have security vulnerabilities.
The current best-practice is to disable access to it alltogether if you don't need it, so you should have the abillity to do so in my opinion.

To disable access to the XML-RPC endpoint you can set WORDPRESS_ENABLE_XML_RPC=no.
This will create a new htaccess rule when WordPress is initialized:

# Disable the oudated WordPress XML-RPC endpoint to prevent security vulnerabilities.
<Files xmlrpc.php>
Order Allow,Deny
Deny from all
</Files>

Benefits

By blocking the XML-RPC endpoint you now have one thing less to worry about as a site administrator.
There are also some plugins that do the same, or you could use a filter in the child theme. However, for me, using the htaccess file is the best and safest approach.

Possible drawbacks

Blocking the endpoint could cause problems for users who still use it for access through third-party software.
However, the endpoint has long been deprecated, so further use is already discouraged and it will likely be removed altogether somewhere in the future.

Applicable issues

@github-actions github-actions bot added the triage Triage is needed label Oct 3, 2023
@bitnami-bot bitnami-bot requested a review from carrodher October 3, 2023 12:39
@carrodher
Copy link
Member

Thank you for initiating this pull request. We appreciate your effort. Just a friendly reminder that it's important to sign your commits. Adding your signature certifies that you either authored the patch or have the necessary rights to contribute the changes. You can find detailed information on how to do this in the “Sign your work” section of our contributing guidelines.

Feel free to reach out if you have any questions or need assistance with the signing process.

@kimdre kimdre closed this Oct 4, 2023
@github-actions github-actions bot added the solved label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bitnami/wordpress] Add env var to disable XML-RPC
2 participants