Skip to content

Commit 7725474

Browse files
Fixed the internal regular expression used for parsing Easy Connect
strings to avoid errors with connection string arguments containing the "/" character.
1 parent c22514a commit 7725474

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

doc/src/release_notes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ Thick Mode Changes
1919
Common Changes
2020
++++++++++++++
2121

22+
#) Fixed the internal regular expression used for parsing :ref:`Easy Connect
23+
<easyconnect>` strings to avoid errors with connection string arguments
24+
containing the ``/`` character.
25+
2226

2327
oracledb 2.1.1 (March 2024)
2428
---------------------------

src/oracledb/impl/base/connect_params.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ CONTAINER_PARAM_NAMES = set((
5151
# regular expression used for determining if a connect string refers to an Easy
5252
# Connect string or not
5353
EASY_CONNECT_PATTERN = \
54-
"((?P<protocol>\w+)://)?(?P<host>[^:/]+)(:(?P<port>\d+)?)?/" \
54+
"^((?P<protocol>\w+)://)?(?P<host>[\w\d.-]+)(:(?P<port>\d+)?)?/" \
5555
"(?P<service_name>[^:?]*)(:(?P<server_type>\w+))?"
5656

5757
# dictionary of tnsnames.ora files, indexed by the directory in which the file

0 commit comments

Comments
 (0)