From 6337a95f050afc20941ddc4ff06370608a890f15 Mon Sep 17 00:00:00 2001 From: Leandro Martelli Date: Fri, 7 Nov 2025 22:59:43 +0100 Subject: [PATCH] Limit split so colons are allowed in the password --- pyiceberg/catalog/rest/auth.py | 2 +- tests/catalog/test_rest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyiceberg/catalog/rest/auth.py b/pyiceberg/catalog/rest/auth.py index 48e49f08da..7f56f6300b 100644 --- a/pyiceberg/catalog/rest/auth.py +++ b/pyiceberg/catalog/rest/auth.py @@ -95,7 +95,7 @@ def __init__( def _fetch_access_token(self, credential: str) -> str: if COLON in credential: - client_id, client_secret = credential.split(COLON) + client_id, client_secret = credential.split(COLON, maxsplit=1) else: client_id, client_secret = None, credential diff --git a/tests/catalog/test_rest.py b/tests/catalog/test_rest.py index fb0e2607c9..d2ecd02aba 100644 --- a/tests/catalog/test_rest.py +++ b/tests/catalog/test_rest.py @@ -50,7 +50,7 @@ from pyiceberg.utils.config import Config TEST_URI = "https://iceberg-test-catalog/" -TEST_CREDENTIALS = "client:secret" +TEST_CREDENTIALS = "client:secret_with:colon" TEST_OAUTH2_SERVER_URI = "https://auth-endpoint/" TEST_TOKEN = "some_jwt_token" TEST_SCOPE = "openid_offline_corpds_ds_profile"