This release is a pre-release and may not be stable for production use.
Products.DisableXMLRPC
Disable Zope’s built-in XML-RPC support on older Zope versions.
Zope 5.13 introduced the enable-xmlrpc directive in zope.conf: when set to off, every POST request with Content-Type: text/xml (i.e. an XML-RPC call) is rejected with 400 Bad Request: Unsupported request type. XML-RPC is rarely used nowadays and is a common target for abuse (brute force, amplification, …).
This product backports the same behaviour to:
Zope2 2.13 (Plone 4.x, Python 2.7)
Zope 4.x (Plone 5.2, Python 2.7 and 3)
Zope 5.x < 5.13 (Plone 6.0 / 6.1, Python 3)
On Zope >= 5.13 the product does nothing (it only logs a message): use the native directive instead:
enable-xmlrpc off
How it works
In all these versions HTTPRequest.processInputs uses the module global ZPublisher.HTTPRequest.xmlrpc to parse XML-RPC calls. The product replaces it with a small proxy that raises zExceptions.BadRequest('Unsupported request type') when XML-RPC is disabled, and delegates to the original ZPublisher.xmlrpc module otherwise. processInputs itself is not patched.
The patch is applied when the product is imported, which Zope does at startup for every package in the Products namespace: no ZCML and no add-on activation are needed.
Installation
XML-RPC is disabled as soon as the product is installed.
Buildout (Plone 4.x / 5.x):
[instance]
eggs =
...
Products.DisableXMLRPC
pip:
pip install Products.DisableXMLRPC
On Zope2 2.13 you can also simply copy the src/Products/DisableXMLRPC folder into the instance products directory. This does not work on Zope 4/5 under WSGI, where the products directive no longer exists.
At startup you should see in the log:
INFO Products.DisableXMLRPC XML-RPC support patched (currently disabled). ...
Configuration
XML-RPC can be re-enabled, in order of precedence:
with the ZOPE_ENABLE_XMLRPC environment variable (on/off, true/false, yes/no, 1/0);
with a product-config section in zope.conf:
<product-config disable-xmlrpc> enable-xmlrpc on </product-config>With plone.recipe.zope2instance:
[instance] zope-conf-additional = <product-config disable-xmlrpc> enable-xmlrpc on </product-config>otherwise XML-RPC is disabled.
Testing it
curl -i -X POST -H 'Content-Type: text/xml' \
--data '<?xml version="1.0"?><methodCall><methodName>getId</methodName></methodCall>' \
http://localhost:8080/Plone
returns 400 Bad Request while XML-RPC is disabled.
Running the tests
tox
Environments: py27-zope213 (Zope2 2.13), py27-zope4, py38-zope4, py311-zope512 and py311-zope513 (native support, the patch must not be applied).
Changelog
1.0.0a2 (2026-11-06)
Nothing changed yet.
1.0.0a1 (2026-11-06)
Initial release: backport of Zope 5.13’s enable-xmlrpc directive for Zope2 2.13, Zope 4 and Zope 5 < 5.13 (Python 2.7 and 3).
Metadata
Release files for Products.DisableXMLRPC 1.0.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| products_disablexmlrpc-1.0.0a2.tar.gz | 9.1 kB | Without provenance | Details for products_disablexmlrpc-1.0.0a2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| products_disablexmlrpc-1.0.0a2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for products_disablexmlrpc-1.0.0a2-py2.py3-none-any.whl |
Total release size: 16.7 kB
Release files / products_disablexmlrpc-1.0.0a2.tar.gz
| Download URL | products_disablexmlrpc-1.0.0a2.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5273498e2ce7b2ae6bae61c6ceeb11ad5f9d07df2038c2e3cc842b39bc368573
|
|
BLAKE2b-256 checksum How to use checksums |
b16b22007c18342e8949f413577c00ec5b7cf3b01428767329865e02ac6c19ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Release files / products_disablexmlrpc-1.0.0a2-py2.py3-none-any.whl
| Download URL | products_disablexmlrpc-1.0.0a2-py2.py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a605dbf2bea8b6225fea085a71f44f94df3ed9d295154ffe65a4e5bad254440d
|
|
BLAKE2b-256 checksum How to use checksums |
07545a6185b6bc06275223c97c39fa44cd71065311ec8ee447248487bbaf7bba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Security for Products.DisableXMLRPC 1.0.0a2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.