diff options
author | MomentQYC <62551256+MomentQYC@users.noreply.github.com> | 2023-10-02 21:07:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 09:07:53 -0400 |
commit | 5725712d477e41761aa89a79edd77d613c36a30a (patch) | |
tree | 1722027fcfc5232fb830042420008d0f7aff39c8 /synapse/rest/admin | |
parent | Bump phonenumbers from 8.13.19 to 8.13.22 (#16413) (diff) | |
download | synapse-5725712d477e41761aa89a79edd77d613c36a30a.tar.xz |
Remove Python version from `/_synapse/admin/v1/server_version` (#16380)
There's no reason to expose the full Python version over what is frequently a public API.
Diffstat (limited to 'synapse/rest/admin')
-rw-r--r-- | synapse/rest/admin/__init__.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/synapse/rest/admin/__init__.py b/synapse/rest/admin/__init__.py index 7d0b4b55a0..e42dade246 100644 --- a/synapse/rest/admin/__init__.py +++ b/synapse/rest/admin/__init__.py @@ -16,7 +16,6 @@ # limitations under the License. import logging -import platform from http import HTTPStatus from typing import TYPE_CHECKING, Optional, Tuple @@ -107,10 +106,7 @@ class VersionServlet(RestServlet): PATTERNS = admin_patterns("/server_version$") def __init__(self, hs: "HomeServer"): - self.res = { - "server_version": SYNAPSE_VERSION, - "python_version": platform.python_version(), - } + self.res = {"server_version": SYNAPSE_VERSION} def on_GET(self, request: SynapseRequest) -> Tuple[int, JsonDict]: return HTTPStatus.OK, self.res |