From 5725712d477e41761aa89a79edd77d613c36a30a Mon Sep 17 00:00:00 2001 From: MomentQYC <62551256+MomentQYC@users.noreply.github.com> Date: Mon, 2 Oct 2023 21:07:53 +0800 Subject: 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. --- synapse/rest/admin/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'synapse/rest/admin/__init__.py') 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 -- cgit 1.4.1