From 8f47ff9e4a284716ac3b0e05473a1402577dc08f Mon Sep 17 00:00:00 2001 From: Hugo Dupras Date: Tue, 12 May 2026 17:28:35 +0200 Subject: [PATCH 1/2] [client-python] Strip trailing slash from URL before building API endpoint requests 2.34.0 (#7315) no longer normalizes duplicate leading slashes in URI paths. When OPENCTI_URL ends with '/', the naive concatenation url + '/graphql' produces '//graphql', which the server rejects as 'Path not found'. Using url.rstrip('/') ensures a clean path regardless of the requests version. --- client-python/pycti/api/opencti_api_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-python/pycti/api/opencti_api_client.py b/client-python/pycti/api/opencti_api_client.py index 38c84ca2ee6c..9a8ce4a3ce66 100644 --- a/client-python/pycti/api/opencti_api_client.py +++ b/client-python/pycti/api/opencti_api_client.py @@ -249,7 +249,7 @@ def __init__( # Define API self.api_token = token - self.api_url = url + "/graphql" + self.api_url = url.rstrip("/") + "/graphql" if provider is not None: provider_pattern_checker = re.compile( r"^[A-Za-z]+\/\d+(?:\.[a-z]*\d+){0,}$" From 0597f343ed54b162049e634e0f21860029e6d532 Mon Sep 17 00:00:00 2001 From: Hugo Dupras Date: Wed, 13 May 2026 09:49:05 +0200 Subject: [PATCH 2/2] fix: Restrain requests version to avoid issue with trailing slash in url --- client-python/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-python/requirements.txt b/client-python/requirements.txt index 81e1ab1d1e80..9466d80af7f7 100644 --- a/client-python/requirements.txt +++ b/client-python/requirements.txt @@ -8,7 +8,7 @@ python_json_logger~=4.0.0 PyYAML~=6.0 pyjwt[crypto]~=2.12.0 pydantic>=2.8.2, <3 -requests>=2.32.0, <3 +requests~=2.33.0 setuptools~=82.0.0 cachetools~=7.0.1 prometheus-client~=0.24.1